im-iad-eval
IM-IAD: Industrial Image Anomaly Detection Benchmark in Manufacturing — Xie et al. (2023) (arXiv:2301.13359, 2023)
What this evaluates
Evaluates industrial image anomaly detection algorithms across seven manufacturing datasets under unsupervised, few-shot, continual, and fully supervised settings. It probes both image-level classification and pixel-level localization capabilities, while also measuring computational efficiency like inference speed and GPU memory.
Datasets
- MVTec AD — total ?; splits: test (-1)
- MVTec LOCO-AD — total ?; splits: test (-1)
- MPDD — total ?; splits: test (-1)
- BTAD — total ?; splits: test (-1)
- MTD — total ?; splits: test (-1)
- VisA — total ?; splits: test (-1)
- DAGM — total ?; splits: test (-1)
Metrics
Image AUC (primary) — range: [0, 1]
- Area under the Receiver Operating Characteristic (ROC) curve for image-level binary anomaly classification. Computed by varying the classification threshold and plotting true positive rate against false positive rate.
Pixel AP — range: [0, 1]
- Average Precision for pixel-level anomaly localization. Computed from the precision-recall curve over all pixels using the anomaly heatmap scores.
Pixel PRO — range: [0, 1]
- Product-Region Overlap metric for pixel-level localization. Measures the mean overlap ratio between predicted anomaly regions and ground truth masks across multiple thresholds.
Input / output format
Input: RGB images of industrial products, accompanied by binary masks for pixel-level anomalies and binary labels for image-level classification.
Output: Per-image anomaly score and per-pixel anomaly heatmap/mask.
Scoring recipe
def compute_auc(y_true, y_pred):
fpr, tpr, _ = roc_curve(y_true, y_pred)
return auc(fpr, tpr)
def compute_ap(y_true, y_pred):
precision, recall, _ = precision_recall_curve(y_true, y_pred)
return auc(recall, precision)
def compute_pro(y_true_mask, y_pred_map, thresholds):
overlaps = []
for thr in thresholds:
pred_mask = (y_pred_map > thr).astype(int)
intersection = np.logical_and(pred_mask, y_true_mask).sum()
union = np.logical_or(pred_mask, y_true_mask).sum()
overlaps.append(intersection / union if union > 0 else 0)
return np.mean(overlaps)
Common pitfalls
- Image-level and pixel-level metrics often diverge; a model can excel at one but fail at the other, so reporting only one is misleading.
- Logical anomalies (displacement/missing parts) are structurally different from dents/scratches and require global feature extraction that many structural detectors lack.
- Efficiency metrics (inference time, GPU memory) are critical for real-world deployment but are frequently secondary to accuracy in academic benchmarks.
Evidence (verbatim from paper)
Researchers commonly use image-level and pixel-level metrics to evaluate the classification performance of IAD algorithms. In practice, the image-level metric is used to judge whether the whole product is abnormal, while the pixel-level metric indicates anomaly localization performance... According to Table VI, specific IAD methods, like PatchCore, perform well on image AUROC but poorly on pixel AP, or vice versa.
Citation
@misc{xie2023imiad,
title={IM-IAD: Industrial Image Anomaly Detection Benchmark in Manufacturing},
author={Xie et al. (2023)},
year={2023},
note={arXiv:2301.13359}
}
1---2name: im-iad-eval3description: Evaluates industrial image anomaly detection algorithms across seven manufacturing datasets under unsupervised, few-shot, continual, and fully supervised settings. It probes both image-level classification and pixel-level localization capabilities, while also measuring computational efficiency like inference speed and GPU memory. Use when the user wants to benchmark on MVTec AD, MVTec LOCO-AD, MPDD, BTAD, MTD, VisA, DAGM, or asks about evaluating this task. Reports Image AUC.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/im-iad-eval6 skill_kind: dataset_eval7 source_arxiv: 2301.133598 bibtex_key: xie2023imiad9 confidence: high10---1112# im-iad-eval1314> IM-IAD: Industrial Image Anomaly Detection Benchmark in Manufacturing — Xie et al. (2023) (arXiv:2301.13359, 2023)1516## What this evaluates1718Evaluates industrial image anomaly detection algorithms across seven manufacturing datasets under unsupervised, few-shot, continual, and fully supervised settings. It probes both image-level classification and pixel-level localization capabilities, while also measuring computational efficiency like inference speed and GPU memory.1920## Datasets2122- **MVTec AD** — total ?; splits: test (-1)23- **MVTec LOCO-AD** — total ?; splits: test (-1)24- **MPDD** — total ?; splits: test (-1)25- **BTAD** — total ?; splits: test (-1)26- **MTD** — total ?; splits: test (-1)27- **VisA** — total ?; splits: test (-1)28- **DAGM** — total ?; splits: test (-1)2930## Metrics3132- `Image AUC` **(primary)** — range: [0, 1]33 - Area under the Receiver Operating Characteristic (ROC) curve for image-level binary anomaly classification. Computed by varying the classification threshold and plotting true positive rate against false positive rate.34- `Pixel AP` — range: [0, 1]35 - Average Precision for pixel-level anomaly localization. Computed from the precision-recall curve over all pixels using the anomaly heatmap scores.36- `Pixel PRO` — range: [0, 1]37 - Product-Region Overlap metric for pixel-level localization. Measures the mean overlap ratio between predicted anomaly regions and ground truth masks across multiple thresholds.3839## Input / output format4041**Input**: RGB images of industrial products, accompanied by binary masks for pixel-level anomalies and binary labels for image-level classification.4243**Output**: Per-image anomaly score and per-pixel anomaly heatmap/mask.4445## Scoring recipe4647```python48def compute_auc(y_true, y_pred):49 fpr, tpr, _ = roc_curve(y_true, y_pred)50 return auc(fpr, tpr)5152def compute_ap(y_true, y_pred):53 precision, recall, _ = precision_recall_curve(y_true, y_pred)54 return auc(recall, precision)5556def compute_pro(y_true_mask, y_pred_map, thresholds):57 overlaps = []58 for thr in thresholds:59 pred_mask = (y_pred_map > thr).astype(int)60 intersection = np.logical_and(pred_mask, y_true_mask).sum()61 union = np.logical_or(pred_mask, y_true_mask).sum()62 overlaps.append(intersection / union if union > 0 else 0)63 return np.mean(overlaps)64```6566## Common pitfalls6768- Image-level and pixel-level metrics often diverge; a model can excel at one but fail at the other, so reporting only one is misleading.69- Logical anomalies (displacement/missing parts) are structurally different from dents/scratches and require global feature extraction that many structural detectors lack.70- Efficiency metrics (inference time, GPU memory) are critical for real-world deployment but are frequently secondary to accuracy in academic benchmarks.7172## Evidence (verbatim from paper)7374> Researchers commonly use image-level and pixel-level metrics to evaluate the classification performance of IAD algorithms. In practice, the image-level metric is used to judge whether the whole product is abnormal, while the pixel-level metric indicates anomaly localization performance... According to Table VI, specific IAD methods, like PatchCore, perform well on image AUROC but poorly on pixel AP, or vice versa.7576## Citation7778```bibtex79@misc{xie2023imiad,80 title={IM-IAD: Industrial Image Anomaly Detection Benchmark in Manufacturing},81 author={Xie et al. (2023)},82 year={2023},83 note={arXiv:2301.13359}84}85```8687- arXiv: 2301.13359