Anodapter: A Unified Framework for Generating Aligned Anomaly Images and Masks Using Diffusion Models - Shin, Minkyoung; Jeong, Seonggyun; Heo, Yong Seok (IEEE Access, 2025)
In industrial manufacturing, anomaly inspection performance is frequently hampered by the scarcity of anomaly data. To address this issue, synthetic anomaly masks and corresponding images are generated using various methods. These methods typically employ separate branches within a single backbone or distinct models for generating anomaly masks and images. However, such approaches frequently result in misalignment between the anomaly mask and image, and a reduction in realism, which adversely affects the performance of downstream tasks. To address these challenges, we introduce Anodapter, a unified few-shot anomaly generation model that utilizes a single diffusion model to sequentially generate well-aligned anomaly masks and images. Unlike earlier models such as AnomalyDiffusion, which use separate models for mask and image generation, Anodapter integrates both tasks into a single diffusion model through its proposed Switch Adapter, eliminating misalignment and improving realism. This unified approach not only enables the alternating generation of masks and images within a single model, but also significantly enhances both precision and realism. The model is designed to facilitate the generation of anomaly images either from generated or user-specified masks, ensuring precise alignment and high-quality results. To achieve this, Anodapter efficiently separates anomaly information into appearance and spatial components. For spatial control, we introduce a Switch Adapter that manages the spatial arrangements of anomalies. This adapter provides targeted conditioning to the backbone diffusion model to generate well-aligned anomaly masks and images. For appearance control, the model employs specialized prompts with unique identifiers, enabling selective generation of anomaly images or masks. These identifiers assist the model in learning the features of anomalous regions and the overall structure of the image. Through extensive experiments with various datasets, including MVTec AD, MVTec LOCO, and BTAD, we demonstrate that our model can generate realistic and diverse anomaly datasets. It significantly outperforms existing methods in downstream tasks such as anomaly detection, localization, and classification, both quantitatively and qualitatively. Specifically, our model achieved state-of-the-art performance, with an image-level AUROC of 98.48% in anomaly detection, a pixel-level AUROC of 98.82% in anomaly localization, and an anomaly classification accuracy of 71.11% on the MVTec AD dataset, surpassing previous approaches.
Keywords: Anomaly detection; Anomaly generation; Anomaly inspection; Diffusion model; Down-stream; Few-shot image generation; Image generations; Industrial manufacturing; Performance; Unified framework; Anomaly generation; anomaly inspection; few-shot image generation