AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model

Type: Article

Publication Date: 2024-03-24

Citations: 17

DOI: https://doi.org/10.1609/aaai.v38i8.28696

Abstract

Anomaly inspection plays an important role in industrial manufacture. Existing anomaly inspection methods are limited in their performance due to insufficient anomaly data. Although anomaly generation methods have been proposed to augment the anomaly data, they either suffer from poor generation authenticity or inaccurate alignment between the generated anomalies and masks. To address the above problems, we propose AnomalyDiffusion, a novel diffusion-based few-shot anomaly generation model, which utilizes the strong prior information of latent diffusion model learned from large-scale dataset to enhance the generation authenticity under few-shot training data. Firstly, we propose Spatial Anomaly Embedding, which consists of a learnable anomaly embedding and a spatial embedding encoded from an anomaly mask, disentangling the anomaly information into anomaly appearance and location information. Moreover, to improve the alignment between the generated anomalies and the anomaly masks, we introduce a novel Adaptive Attention Re-weighting Mechanism. Based on the disparities between the generated anomaly image and normal sample, it dynamically guides the model to focus more on the areas with less noticeable generated anomalies, enabling generation of accurately-matched anomalous image-mask pairs. Extensive experiments demonstrate that our model significantly outperforms the state-of-the-art methods in generation authenticity and diversity, and effectively improves the performance of downstream anomaly inspection tasks. The code and data are available in https://github.com/sjtuplayer/anomalydiffusion.

Locations

  • Proceedings of the AAAI Conference on Artificial Intelligence - View - PDF
  • arXiv (Cornell University) - View - PDF

Similar Works

Action Title Year Authors
+ AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model 2023 Teng Hu
Jiangning Zhang
Ran Yi
Yuzhen Du
Xu Chen
Liang Liu
Yabiao Wang
Chengjie Wang
+ PDF Chat DualAnoDiff: Dual-Interrelated Diffusion Model for Few-Shot Anomaly Image Generation 2024 Ying Jin
Jinlong Peng
Qingdong He
Teng Hu
Hao Chen
Jiafu Wu
Wenbing Zhu
Mingmin Chi
Jun Liu
Yabiao Wang
+ PDF Chat AnomalySD: Few-Shot Multi-Class Anomaly Detection with Stable Diffusion Model 2024 Zhenyu Yan
Qingqing Fang
Zhao Lv
Qinliang Su
+ PDF Chat A Novel Approach to Industrial Defect Generation through Blended Latent Diffusion Model with Online Adaptation 2024 Hanxi Li
Zhengxun Zhang
Hao Chen
Lin Wu
Bo Li
Deyin Liu
Mingwen Wang
+ PDF Chat "Stones from Other Hills can Polish Jade": Zero-shot Anomaly Image Synthesis via Cross-domain Anomaly Injection 2025 Siqi Wang
Yifan Hu
Xinwang Liu
Siwei Wang
Guangpu Wang
Chuanfu Xu
Jie Liu
Ping Chen
+ PDF Chat SeaS: Few-shot Industrial Anomaly Image Generation with Separation and Sharing Fine-tuning 2024 Zhewei Dai
Shaoda Zeng
Haotian Liu
Xurui Li
Feng Xue
Yu Zhou
+ Anomaly Detection Using GANs for Visual Inspection in Noisy Training Data 2018 Masanari Kimura
Takashi Yanagihara
+ PDF Chat FADE: Few-shot/zero-shot Anomaly Detection Engine using Large Vision-Language Model 2024 Yuanwei Li
Elizaveta Ivanova
Martins Bruveris
+ PDF Chat Few-shot Defect Image Generation based on Consistency Modeling 2024 Qingfeng Shi
Jing Wei
Fei Shen
Zhengtao Zhang
+ Natural Synthetic Anomalies for Self-Supervised Anomaly Detection and Localization 2021 Hannah M. Schlüter
Jeremy Tan
Benjamin Hou
Bernhard Kainz
+ FractalAD: A simple industrial anomaly detection method using fractal anomaly generation and backbone knowledge distillation 2023 Xuan Xia
Weijie Lv
Xing He
Chuanqi Liu
Ning Ding
+ PDF Chat CLIP-FSAC++: Few-Shot Anomaly Classification with Anomaly Descriptor Based on CLIP 2024 Zuo Zuo
Jiahao Dong
Yao Wu
Yanyun Qu
Zongze Wu
+ PDF Chat Towards Zero-shot Point Cloud Anomaly Detection: A Multi-View Projection Framework 2024 Yuqi Cheng
Yunkang Cao
Guoyang Xie
Zhichao Lu
Weiming Shen
+ PDF Chat RealNet: A Feature Selection Network with Realistic Synthetic Anomaly for Anomaly Detection 2024 Ximiao Zhang
Min Xu
Xiuzhuang Zhou
+ Produce Once, Utilize Twice for Anomaly Detection 2023 Shuyuan Wang
Qi Li
Huiyuan Luo
Chengkan Lv
Zhengtao Zhang
+ Prototypical Residual Networks for Anomaly Detection and Localization 2022 Hui Zhang
Zuxuan Wu
Zheng Wang
Zhineng Chen
Yu–Gang Jiang
+ PDF Chat Prototypical Residual Networks for Anomaly Detection and Localization 2023 Hui Zhang
Zuxuan Wu
Zheng Wang
Zhineng Chen
Yu‐Gang Jiang
+ A Hierarchical Transformation-Discriminating Generative Model for Few Shot Anomaly Detection 2021 Shelly Sheynin
Sagie Benaim
Lior Wolf
+ Focus Your Distribution: Coarse-to-Fine Non-Contrastive Learning for Anomaly Detection and Localization 2021 Ye Zheng
Xiang Wang
Rui Deng
Tianpeng Bao
Rui Zhao
Liwei Wu
+ PDF Chat R3D-AD: Reconstruction via Diffusion for 3D Anomaly Detection 2024 Zheyuan Zhou
Le Wang
Naiyu Fang
Zili Wang
Lemiao Qiu
Shuyou Zhang