File size: 3,390 Bytes
06bf366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
license: apache-2.0
datasets:
- mvtec-ad
metrics:
- auroc
- f1
pipeline_tag: image-segmentation
tags:
- anomaly-detection
- industrial-inspection
- mvtec-ad
- deep-learning
- openvino
- quality-control
library_name: openvino
---

# Model Card for MetalPart-Anomaly-Detector

This model detects anomalies in metal parts during production processes. It uses **Deep Learning** and **OpenVINO Runtime** for high-accuracy anomaly detection, providing heatmaps and segmentation masks for visualizing defects like scratches or deformations.

---

## Model Details

### Model Description

- **Developed by:** Keyvan Hardani
- **Shared by:** [GitHub Repository](https://github.com/Keyvanhardani/Anomaly-Detection-Metal)
- **Model type:** Image segmentation and anomaly detection
- **License:** Apache 2.0
- **Finetuned from model:** None

### Model Sources

- **Repository:** [GitHub Link](https://github.com/Keyvanhardani/Anomaly-Detection-Metal)
- **Demo:** [Hugging Face Demo Link](https://huggingface.co/spaces)

---

## Uses

### Direct Use

This model is directly usable for:
- **Quality Control**: Ensuring defect-free metal parts in production.
- **Predictive Maintenance**: Early detection of anomalies to avoid major breakdowns.
- **Automated Inspection**: Enhancing efficiency in industrial workflows.

### Out-of-Scope Use

This model is not suited for non-industrial materials or environments with highly unstructured data.

---

## Bias, Risks, and Limitations

### Limitations
- Requires high-quality input images with consistent lighting for optimal results.
- Performance may vary depending on the dataset used.

### Recommendations
Users should test the model with a subset of their own data before large-scale deployment.

---

## How to Get Started with the Model

To use this model:
1. Download the pre-trained weights (`model.xml`, `model.bin`, and `metadata.json`) from the repository.
2. Place the model files in the appropriate directory, as described in the [GitHub README](https://github.com/Keyvanhardani/Anomaly-Detection-Metal).

---

## Training Details

### Training Data
- **Dataset Used:** MVTec AD (metal parts subset)
- **Preprocessing:** Normalization and resizing to model-specific input dimensions.

### Training Procedure
- Framework: OpenVINO Runtime
- Loss Function: Cross-Entropy Loss
- Optimizer: Adam

---

## Evaluation

### Metrics
- **AUROC:** Measures the model's ability to distinguish between anomalous and normal parts.
- **F1 Score:** Assesses the balance between precision and recall.

### Results
- **Image AUROC:** 0.95
- **Image F1 Score:** 0.94
- **Pixel AUROC:** 0.96
- **Pixel F1 Score:** 0.71

---

## Environmental Impact

- **Hardware Type:** GPU-based training and inference (NVIDIA RTX 4080)
- **Hours used:** Approx. 10 hours
- **Carbon Emitted:** [Estimate pending]

---

## Citation

If you use this model, please cite it as:

@misc {keyvan_hardani_2024,
	author       = { {Keyvan Hardani} },
	title        = { AnomalyDetection-MVTech-Metal (Revision b326b4e) },
	year         = 2024,
	url          = { https://huggingface.co/Keyven/AnomalyDetection-MVTech-Metal },
	doi          = { 10.57967/hf/3678 },
	publisher    = { Hugging Face }
}

---

## Model Card Authors

- Keyvan Hardani

## Contact

For questions or support, please reach out via [GitHub Issues](https://github.com/Keyvanhardani/Anomaly-Detection-Metal/issues)