Background-Aware Defect Generation for Robust Industrial Anomaly Detection
Youngjae Cho, Gwangyeol Kim, Sirojbek Safarov, Seongdeok Bang, Jaewoo Park
TL;DR
This work tackles data scarcity in industrial anomaly detection by introducing a background-aware defect generation framework that disentangles defect denoising from the background. It combines a disentanglement loss with DDIM Inversion and masked cross-attention to synthesize contextually accurate defects that respect the target background, including logical anomalies. Theoretical results guarantee background fidelity during defect generation, and extensive experiments on MVTec-AD and MVTec-Loco show superior defect generation quality and improved anomaly detection performance over prior methods. The approach yields better generalization, reduces unrealistic defect syntheses, and provides practical data augmentation benefits for robust inspection systems.
Abstract
Detecting anomalies in industrial settings is challenging due to the scarcity of labeled anomalous data. Generative models can mitigate this issue by synthesizing realistic defect samples, but existing approaches often fail to model the crucial interplay between defects and their background. This oversight leads to unrealistic anomalies, especially in scenarios where contextual consistency is essential (i.e., logical anomaly). To address this, we propose a novel background-aware defect generation framework, where the background influences defect denoising without affecting the background itself by ensuring realistic synthesis while preserving structural integrity. Our method leverages a disentanglement loss to separate the background' s denoising process from the defect, enabling controlled defect synthesis through DDIM Inversion. We theoretically demonstrate that our approach maintains background fidelity while generating contextually accurate defects. Extensive experiments on MVTec AD and MVTec Loco benchmarks validate our mehtod's superiority over existing techniques in both defect generation quality and anomaly detection performance.
