A Novel Approach to Industrial Defect Generation through Blended Latent Diffusion Model with Online Adaptation

Hanxi Li,Zhengxun Zhang,Hao Chen,Lin Wu,Bo Li,Deyin Liu,Mingwen Wang
2024-03-26
Abstract:Effectively addressing the challenge of industrial Anomaly Detection (AD) necessitates an ample supply of defective samples, a constraint often hindered by their scarcity in industrial contexts. This paper introduces a novel algorithm designed to augment defective samples, thereby enhancing AD performance. The proposed method tailors the blended latent diffusion model for defect sample generation, employing a diffusion model to generate defective samples in the latent space. A feature editing process, controlled by a ``trimap" mask and text prompts, refines the generated samples. The image generation inference process is structured into three stages: a free diffusion stage, an editing diffusion stage, and an online decoder adaptation stage. This sophisticated inference strategy yields high-quality synthetic defective samples with diverse pattern variations, leading to significantly improved AD accuracies based on the augmented training set. Specifically, on the widely recognized MVTec AD dataset, the proposed method elevates the state-of-the-art (SOTA) performance of AD with augmented data by 1.5%, 1.9%, and 3.1% for AD metrics AP, IAP, and IAP90, respectively. The implementation code of this work can be found at the GitHub repository
Computer Vision and Pattern Recognition,Multimedia
What problem does this paper attempt to address?
The paper primarily focuses on addressing the problem of Anomaly Detection (AD) in industrial inspection, particularly the challenge posed by the scarcity of defect samples in industrial environments. Specifically, the paper proposes a new algorithm to generate high-quality synthetic defect samples to enhance the performance of anomaly detection systems. The main contributions of the paper can be summarized as follows: 1. **Using Diffusion Models for Defect Generation**: For the first time, diffusion models are applied to the task of industrial defect generation. By utilizing the Blended Latent Diffusion Model (BLDM), the paper proposes a stable, high-quality, and controllable defect generation method that can generate defect samples better than existing technologies. 2. **Customized BLDM Algorithm**: To meet the needs of defect generation, the paper innovatively improves BLDM, including the introduction of a novel "defect trimap" to define target objects and defect areas, the addition of a cascaded "editing" stage to ensure the authenticity of generated samples, and the proposal of an online adaptive mechanism for the image encoder to enhance the quality of generated images. These improvements collectively form the AdaBLDM algorithm proposed in the paper, whose generated defect sample quality significantly surpasses existing technologies. 3. **Outstanding Performance on the MVTec AD Dataset**: The defect samples generated based on the proposed AdaBLDM algorithm achieve the latest state-of-the-art (SOTA) performance on the MVTec AD dataset, improving the AD metrics AP, IAP, and IAP90 by 1.5%, 1.9%, and 3.1%, respectively. In summary, this research aims to address the issue of insufficient defect samples in industrial defect detection by introducing advanced diffusion model technology, thereby improving the accuracy and reliability of anomaly detection systems.