generalad-eval
GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Features — Sträter et al. (2024) (arXiv:2407.12427, 2024)
What this evaluates
Evaluates cross-domain anomaly detection capability across semantic, near-distribution, and industrial benchmarks. Probes the model's ability to detect pixel-level defects and semantic novelties using a self-supervised transformer discriminator that attends to distorted features without task-specific tuning.
Datasets
- CIFAR-10 — total ?; splits: train (-1), test (-1)
- CIFAR-100 — total ?; splits: train (-1), test (-1)
- Fashion-MNIST — total ?; splits: train (-1), test (-1)
- View — total ?; splits: train (-1), test (-1)
- Aircraft-FGVC — total ?; splits: train (-1), test (-1)
- Stanford Cars — total ?; splits: train (-1), test (-1)
- MVTec-AD — total ?; splits: train (-1), test (-1)
- MVTec-LOCO — total ?; splits: train (-1), test (-1)
- VisA — total ?; splits: train (-1), test (-1)
- MPDD — total ?; splits: train (-1), test (-1)
Metrics
AUROC (primary) — range: [0, 1]
- Area Under the Receiver Operating Characteristic curve. Computed separately for image-level binary classification and pixel-level segmentation/localization tasks.
Input / output format
Input: Input images rescaled to 518×518 without augmentations. Processed through a DINOv2 backbone to extract last-layer features, which are normalized. For training, features are distorted via noise injection and patch shuffling to create pseudo-abnormal samples.
Output: Anomaly scores at the image level and pixel-level anomaly score maps. Thresholded to produce binary anomaly labels or segmentation masks.
Scoring recipe
def compute_auroc(scores, labels):
# scores: anomaly scores (higher = more anomalous)
# labels: ground truth (0 = normal, 1 = anomalous)
fpr, tpr, _ = roc_curve(labels, scores)
return auc(fpr, tpr)
Common pitfalls
- The top-K parameter for feature selection must be dataset-specific: K=1369 for semantic/near datasets (covering all patches) and K=10 for industrial datasets (covering small defects).
- Distortion strategies are task-dependent: 'Noise All Patches' for semantic, 'Noise Random Patches' for industrial, and 'Attention Shuffle' for logical anomalies.
- Input images must be rescaled to 518×518 without any image augmentations to maintain consistency with the DINOv2 backbone.
Evidence (verbatim from paper)
We report the AUROC performance for both image-level and pixel-level tasks in tables[1] and[2]. Our experiments encompass three distinct benchmarks. First, we evaluate our approach on four semantic anomaly detection datasets: CIFAR-10, CIFAR-100, Fashion-MNIST, and View. ... Finally, we experiment on four industrial anomaly detection datasets: MVTec-AD, MVTec-LOCO, VisA, and MPDD.
Citation
@misc{strater2024generalad,
title={GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Features},
author={Sträter et al. (2024)},
year={2024},
note={arXiv:2407.12427}
}
1---2name: generalad-eval3description: Evaluates cross-domain anomaly detection capability across semantic, near-distribution, and industrial benchmarks. Probes the model's ability to detect pixel-level defects and semantic novelties using a self-supervised transformer discriminator that attends to distorted features without task-specific tuning. Use when the user wants to benchmark on CIFAR-10, CIFAR-100, Fashion-MNIST, View, Aircraft-FGVC, Stanford Cars, MVTec-AD, MVTec-LOCO, VisA, MPDD, or asks about evaluating this task. Reports AUROC.4---56# generalad-eval78> GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Features — Sträter et al. (2024) (arXiv:2407.12427, 2024)910## What this evaluates1112Evaluates cross-domain anomaly detection capability across semantic, near-distribution, and industrial benchmarks. Probes the model's ability to detect pixel-level defects and semantic novelties using a self-supervised transformer discriminator that attends to distorted features without task-specific tuning.1314## Datasets1516- **CIFAR-10** — total ?; splits: train (-1), test (-1)17- **CIFAR-100** — total ?; splits: train (-1), test (-1)18- **Fashion-MNIST** — total ?; splits: train (-1), test (-1)19- **View** — total ?; splits: train (-1), test (-1)20- **Aircraft-FGVC** — total ?; splits: train (-1), test (-1)21- **Stanford Cars** — total ?; splits: train (-1), test (-1)22- **MVTec-AD** — total ?; splits: train (-1), test (-1)23- **MVTec-LOCO** — total ?; splits: train (-1), test (-1)24- **VisA** — total ?; splits: train (-1), test (-1)25- **MPDD** — total ?; splits: train (-1), test (-1)2627## Metrics2829- `AUROC` **(primary)** — range: [0, 1]30 - Area Under the Receiver Operating Characteristic curve. Computed separately for image-level binary classification and pixel-level segmentation/localization tasks.3132## Input / output format3334**Input**: Input images rescaled to 518×518 without augmentations. Processed through a DINOv2 backbone to extract last-layer features, which are normalized. For training, features are distorted via noise injection and patch shuffling to create pseudo-abnormal samples.3536**Output**: Anomaly scores at the image level and pixel-level anomaly score maps. Thresholded to produce binary anomaly labels or segmentation masks.3738## Scoring recipe3940```python41def compute_auroc(scores, labels):42 # scores: anomaly scores (higher = more anomalous)43 # labels: ground truth (0 = normal, 1 = anomalous)44 fpr, tpr, _ = roc_curve(labels, scores)45 return auc(fpr, tpr)46```4748## Common pitfalls4950- The top-K parameter for feature selection must be dataset-specific: K=1369 for semantic/near datasets (covering all patches) and K=10 for industrial datasets (covering small defects).51- Distortion strategies are task-dependent: 'Noise All Patches' for semantic, 'Noise Random Patches' for industrial, and 'Attention Shuffle' for logical anomalies.52- Input images must be rescaled to 518×518 without any image augmentations to maintain consistency with the DINOv2 backbone.5354## Evidence (verbatim from paper)5556> We report the AUROC performance for both image-level and pixel-level tasks in tables[1] and[2]. Our experiments encompass three distinct benchmarks. First, we evaluate our approach on four semantic anomaly detection datasets: CIFAR-10, CIFAR-100, Fashion-MNIST, and View. ... Finally, we experiment on four industrial anomaly detection datasets: MVTec-AD, MVTec-LOCO, VisA, and MPDD.5758## Citation5960```bibtex61@misc{strater2024generalad,62 title={GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Features},63 author={Sträter et al. (2024)},64 year={2024},65 note={arXiv:2407.12427}66}67```6869- arXiv: 2407.12427