Removing Anomalies as Noises for Industrial Defect Localization

Fanbin Lu, Xufeng Yao, Chi-Wing Fu, Jiaya JiaICCV 2023 · DOI

Abstract

Industrial defect localization is a critical task often hindered by the scarcity of labeled anomalous data. This paper proposes a novel unsupervised framework that treats anomalies as noise within a Denoising Diffusion Probabilistic Model (DDPM). By training exclusively on normal data and utilizing KL divergence and feature-level guidance for reconstruction, the method achieves state-of-the-art localization accuracy on benchmarks like MVTec-AD, effectively overcoming common issues like identity mapping and blurry reconstructions.

Introduction

In industrial manufacturing, identifying defects is vital for quality control. However, the rarity and variety of defects make supervised learning impractical. Unsupervised anomaly detection, which trains only on defect-free "normal" images, is the standard alternative. Traditional Autoencoder-based methods often struggle with "identity mapping"—where the model accidentally reconstructs the defect—and poor reconstruction quality, leading to false positives where normal but slightly blurry areas are flagged as anomalies.

Methodology

The authors introduce a denoising-based framework leveraging Denoising Diffusion Probabilistic Models (DDPM). The core idea is to treat anomalies as a form of noise to be removed during the reconstruction process.

Overview of the proposed Denoise AD framework, illustrating the diffusion process and the use of KL divergence for anomaly detection.

The framework consists of several key innovations:

  • Anomalies as Noise: During inference, Gaussian noise is added to the input image to "overwhelm" anomalous pixels. The model, having been trained only on normal data, then attempts to "denoise" the image back toward the normal distribution manifold.
  • KL Divergence Anomaly Score: Instead of simple pixel subtraction, the model measures the Kullback–Leibler (KL) divergence between predicted and actual posterior distributions. This focuses on structural deviations and ignores minor lighting changes or pixel-level noise.
  • Feature-Level Guidance: A pre-trained EfficientNet extracts semantic features, which the diffusion model is trained to reconstruct alongside pixels, ensuring high-level consistency and capturing details that pixels alone might miss.
  • Gradient Denoising: An iterative process refines the image by following gradients of a feature-matching loss, maintaining visual realism while effectively removing anomalies.

Experimental Results

The model was evaluated on the MVTec-AD benchmark, the industry standard containing 15 categories of objects and textures.

Qualitative comparison of defect localization on a cable sample. The proposed method (d) shows cleaner localization and sharper reconstruction compared to DRAEM (b) and UniAD (c).

Key findings include:

  • State-of-the-Art Localization: The model achieved a Per-Region Overlap (PRO) score of 94.1%, outperforming previous leaders like DRAEM (93.0%) and UniAD (91.1%).
  • Unified Modeling: A single model trained on all 15 categories simultaneously maintained high performance (93.0% PRO), demonstrating robustness where previous methods like PaDiM saw performance degradation.
  • Superior Reconstruction: Qualitative results show significantly sharper and more realistic reconstructions compared to the "ghosting" or blurring seen in competing models, which helps in reducing false positives.

Discussion and Conclusion

While the model sets a new benchmark for accuracy, it faces challenges with background sensitivity—occasionally flagging dust or texture variations as defects. Additionally, the iterative nature of diffusion models introduces higher computational costs compared to single-pass networks. Future work will focus on background suppression techniques and optimizing inference speed for real-time industrial applications.

Summary updated

BibTeX
@inproceedings{lu2023removing,
  author = {Fanbin Lu and Xufeng Yao and Chi-Wing Fu and Jiaya Jia},
  title = {{Removing Anomalies as Noises for Industrial Defect Localization}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  doi = {10.1109/iccv51070.2023.01481},
}
Figure