Unsupervised reconstruction networks using self-attention transformers have achieved state-of-the-art results in multi-class (unified) anomaly detection using a single model. However, these self-attention reconstruction models primarily operate on target features themselves, resulting in perfect reconstruction for both normal and anomaly features due to high consistency with context, leading to failure in anomaly detection. Additionally, these models often result in inaccurate anomaly segmentation due to performing reconstruction in low spatial resolution latent space. To enable reconstruction models enjoying high efficiency while enhancing their generalization for 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 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. We will make the code for OneNIP available.
Live content is unavailable. Log in and register to view live content