Benchmarking Unsupervised Anomaly Detection and Localization

Zheng Ye, Xiang Wang, Yu Qi, Wei Li, Liwei Wu · DOI

Abstract: Unsupervised anomaly detection and localization, as of one the most practical and challenging problems in computer vision, has received great attention in recent years. From the time the MVTec AD dataset was proposed to the present, new research methods that are constantly being proposed push its precision to saturation. It is the time to conduct a comprehensive comparison of existing methods to inspire further research. This paper extensively compares 13 papers in terms of the performance in unsupervised anomaly detection and localization tasks, and adds a comparison of inference efficiency previously ignored by the community. Meanwhile, analysis of the MVTec AD dataset are also given, especially the label ambiguity that affects the model fails to achieve full marks. Moreover, considering the proposal of the new MVTec 3D-AD dataset, this paper also conducts experiments using the existing state-of-the-art 2D methods on this new dataset, and reports the corresponding results with analysis.

Introduction: The Challenge of Industrial Anomaly Detection

In industrial quality control, identifying defects—anomalies—is a "needle-in-a-haystack" problem. Because defects are rare and unpredictable, researchers rely on unsupervised learning, training models exclusively on "normal" samples so they can flag anything that looks different.

While the field has seen a surge in new algorithms, several critical gaps have emerged. First, performance on standard benchmarks like the MVTec AD dataset has climbed above 99% AUROC, suggesting a "saturation point" where it becomes difficult to distinguish true algorithmic progress from dataset-specific overfitting. Second, most research ignores real-world constraints like inference speed (FPS), which is vital for high-speed assembly lines. Finally, the transition from 2D to 3D anomaly detection remains under-explored.

Methodology: Reconstruction vs. Representation

The authors categorize 13 state-of-the-art methods into two primary paradigms:

  • Reconstruction-based Methods: Models like DRAEM or R-D attempt to "rebuild" the input image from a compressed representation. Since they are trained only on normal data, they fail to reconstruct defects accurately. The residual difference between the original and the reconstruction highlights the anomaly.
  • Representation-based Methods: Currently the state-of-the-art, these methods use pre-trained backbones (e.g., ResNet or ViT) to extract features. They then employ distribution estimators, such as k-Nearest Neighbors or Normalizing Flows, to determine if a new image's features deviate from the "normal" cluster.

To ensure a fair comparison, the authors evaluated all methods on a unified framework using identical hardware (NVIDIA GTX 1080Ti).

Datasets and Evaluation

The study utilizes two primary benchmarks:

  • MVTec AD (2D): The industry standard, featuring 15 categories of industrial objects and textures with pixel-level defect annotations.
  • MVTec 3D-AD: A newer dataset providing high-resolution 3D scans. The authors specifically tested how 2D methods perform on the RGB channels of this 3D data.

Key Insights: Saturation and Efficiency

A major finding of this benchmark is the impact of label ambiguity. Models are struggling to reach 100% accuracy not necessarily due to architectural failings, but because ground-truth labels can be inconsistent (e.g., varying levels of precision in marking a scratch). This confirms that the 2D benchmark is largely "solved" for current industrial needs.

Furthermore, the study highlights a massive disparity in inference efficiency. While accuracy is often high across the board, speed varies wildly. FastFlow emerged as a standout, maintaining top-tier accuracy while operating at 21.8 FPS, compared to older methods like SPADE, which managed only 0.67 FPS.

Experimental Results

The benchmark confirms that Representation-based methods generally outperform reconstruction-based ones in both accuracy and efficiency.

Performance of anomaly detection methods on the MVTec AD dataset over time, showing the trend toward saturation.
  • Top Performers: FastFlow and PatchCore lead the field. FastFlow achieved a peak 99.4% Image-level AUROC on MVTec AD.
  • Localization: For pixel-level defect localization, FastFlow again led with 98.6% AUROC.
  • 2D vs. 3D: Surprisingly, 2D representation-based methods (like PatchCore) using only RGB data outperformed many 3D-specific baselines on the MVTec 3D-AD dataset, reaching 81.1% AUROC. This suggests that color and texture remain highly informative even in 3D contexts.
Visual comparison of input images, ground truth masks, and model segmentation results for anomaly localization.

Conclusion and Future Directions

As 2D performance saturates, the community requires more challenging, fine-grained datasets. While 2D methods are robust, future work should focus on architectures that effectively fuse 2D and 3D data to capture geometric anomalies that RGB data might miss. Additionally, there is a clear need for "end-to-end" inference optimization to minimize the overhead of complex post-processing in real-world deployments.

Summary updated

BibTeX
@misc{ye2022benchmarking,
  author = {Zheng Ye and Xiang Wang and Yu Qi and Wei Li and Liwei Wu},
  title = {{Benchmarking Unsupervised Anomaly Detection and Localization}},
  year = {2022},
  eprint = {2205.14852},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.14852},
}
Figure