Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Learning to Detect Multi-class Anomalies with Just One Normal Image Prompt

About

Unsupervised reconstruction networks using self-attention transformers have achieved state-of-the-art performance for multi-class (unified) anomaly detection with a single model. However, these self-attention reconstruction models primarily operate on target features, which may result in perfect reconstruction for both normal and anomaly features due to high consistency with context, leading to failure in detecting anomalies. Additionally, these models often produce inaccurate anomaly segmentation due to performing reconstruction in a low spatial resolution latent space. To enable reconstruction models enjoying high efficiency while enhancing their generalization for unified anomaly detection, we propose a simple yet effective method that reconstructs normal features and restores anomaly features with just One Normal Image Prompt (OneNIP). In contrast to previous work, OneNIP allows for the first time to reconstruct or restore anomalies with just one normal image prompt, effectively boosting unified anomaly detection performance. Furthermore, we propose a supervised refiner that regresses reconstruction errors by using both real normal and synthesized anomalous images, which significantly improves pixel-level anomaly segmentation. OneNIP outperforms previous methods on three industry anomaly detection benchmarks: MVTec, BTAD, and VisA. The code and pre-trained models are available at https://github.com/gaobb/OneNIP.

Bin-Bin Gao• 2025

Related benchmarks

TaskDatasetResultRank
Anomaly LocalizationMVTec AD
Pixel AUROC97.1
369
Anomaly DetectionVisA--
199
Anomaly LocalizationVisA
P-AUROC0.987
119
Anomaly SegmentationMVTec-AD (test)--
85
Anomaly DetectionMPDD--
62
Anomaly ClassificationMVTec-AD (test)
AUROC (Image)97.2
50
Image Anomaly DetectionMVTec AD
Carpet I-AUROC92.1
32
Anomaly LocalizationBTAD
Pixel-level AUROC97.9
20
Anomaly LocalizationMPDD
Average P-AUC95.2
16
Pixel-level Anomaly DetectionMVTec AD--
15
Showing 10 of 15 rows

Other info

Follow for update