DiAD: A Diffusion-based Framework for Multi-class Anomaly Detection

Haoyang He, Jiangning Zhang, Hongxu Chen, Xuhai Chen, Zhishan Li +4 more
12/11/2023
54 citations
cs.CV
diffusion-flow

Official code: lewandofskee/DiAD (216 stars, Python, Apache-2.0, last commit 2024-12-06).

Abstract

Reconstruction-based approaches have achieved remarkable outcomes in anomaly detection. The exceptional image reconstruction capabilities of recently popular diffusion models have sparked research efforts to utilize them for enhanced reconstruction of anomalous images.

Show full abstract

Nonetheless, these methods might face challenges related to the preservation of image categories and pixel-wise structural integrity in the more practical multi-class setting. To solve the above problems, we propose a Difusion-based Anomaly Detection (DiAD) framework for multi-class anomaly detection, which consists of a pixel-space autoencoder, a latent-space Semantic-Guided (SG) network with a connection to the stable diffusion's denoising network, and a feature-space pre-trained feature extractor. Firstly, The SG network is proposed for reconstructing anomalous regions while preserving the original image's semantic information. Secondly, we introduce Spatial-aware Feature Fusion (SFF) block to maximize reconstruction accuracy when dealing with extensively reconstructed areas. Thirdly, the input and reconstructed images are processed by a pre-trained feature extractor to generate anomaly maps based on features extracted at different scales. Experiments on MVTec-AD and VisA datasets demonstrate the effectiveness of our approach which surpasses the state-of-the-art methods, e.g., achieving 96.8/52.6 and 97.2/99.0 (AUROC/AP) for localization and detection respectively on multi-class MVTec-AD dataset. Code will be available at https://lewandofskee.github.io/projects/diad.

View on arXivView PDF

Code Implementations(1)

lewandofskee/DiADOfficial100%
Apache-2.0

Official implementation of DiAD: A Diffusion-based Framework for Multi-class Anomaly Detection.

21626PythonOct 30, 20231 years agoApache-2.0

Similar Papers

Cite this paper

@article{he2023diad,
  title  = {DiAD: A Diffusion-based Framework for Multi-class Anomaly Detection},
  author = {Haoyang He and Jiangning Zhang and Hongxu Chen and Xuhai Chen and Zhishan Li and Xu Chen and Yabiao Wang and Chengjie Wang and Lei Xie},
  year   = {2023},
  eprint = {2312.06607},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.06607v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.06607.svg)](https://codeofpaper.com/paper/2312.06607)

Discussion