EfficientAD: Accurate Visual Anomaly Detection at Millisecond-Level Latencies
Detecting anomalies in images is an important task, especially in real-time computer vision applications. In this work, we focus on computational efficiency and propose a lightweight feature extractor that processes an image in less than a millisecond on a modern GPU. We then use a student-teacher approach to detect anomalous features. We train a student network to predict the extracted features of normal, i.e., anomaly-free training images. The detection of anomalies at test time is enabled by the student failing to predict their features. We propose a training loss that hinders the student from imitating the teacher feature extractor beyond the normal images. It allows us to drastically reduce the computational cost of the student-teacher model, while improving the detection of anomalous features. We furthermore address the detection of challenging logical anomalies that involve invalid combinations of normal local features, for example, a wrong ordering of objects. We detect these anomalies by efficiently incorporating an autoencoder that analyzes images globally. We evaluate our method, called EfficientAD, on 32 datasets from three industrial anomaly detection dataset collections. EfficientAD sets new standards for both the detection and the localization of anomalies. At a latency of two milliseconds and a throughput of six hundred images per second, it enables a fast handling of anomalies. Together with its low error rate, this makes it an economical solution for real-world applications and a fruitful basis for future research.
PDF AbstractCode
Datasets
Task | Dataset | Model | Metric Name | Metric Value | Global Rank | Uses Extra Training Data |
Benchmark |
---|---|---|---|---|---|---|---|
Anomaly Detection | MVTec AD | EfficientAD | Detection AUROC | 99.8 | # 2 | ||
Segmentation AUPRO | 96.6 | # 6 | |||||
Anomaly Detection | MVTec AD | EfficientAD-S | Detection AUROC | 98.8 | # 31 | ||
Segmentation AUROC | 96.8 | # 56 | |||||
Segmentation AUPRO | 96.5 | # 7 | |||||
Segmentation AP | 65.9 | # 11 | |||||
FPS | 614 | # 2 | |||||
Anomaly Detection | MVTec LOCO AD | EfficientAD-M | Avg. Detection AUROC | 90.7 | # 3 | ||
Detection AUROC (only logical) | 86.8 | # 10 | |||||
Detection AUROC (only structural) | 94.7 | # 1 | |||||
Segmentation AU-sPRO (until FPR 5%) | 79.8 | # 1 | |||||
Anomaly Detection | MVTec LOCO AD | EfficientAD-S | Avg. Detection AUROC | 90.0 | # 6 | ||
Detection AUROC (only logical) | 85.8 | # 13 | |||||
Detection AUROC (only structural) | 94.1 | # 2 | |||||
Segmentation AU-sPRO (until FPR 5%) | 77.8 | # 2 | |||||
Anomaly Detection | VisA | EfficientAD-M | Detection AUROC | 98.1 | # 4 | ||
Segmentation AUPRO (until 30% FPR) | 94.0 | # 3 | |||||
Anomaly Detection | VisA | EfficientAD-S | Detection AUROC | 97.5 | # 5 | ||
Segmentation AUPRO (until 30% FPR) | 93.1 | # 4 |