SARD: Segmentation-Aware Anomaly Synthesis via Region-Constrained Diffusion with Discriminative Mask Guidance
Yanshu Wang, Xichen Xu, Xiaoning Lei, Guoyang Xie
TL;DR
The paper tackles the challenge of generating spatially precise industrial anomalies for segmentation. It introduces SARD, a diffusion-based framework with Region-Constrained Diffusion to update only foreground regions and a Discriminative Mask Guidance discriminator for mask-aware supervision. Through extensive experiments on MVTec-AD and BTAD, SARD achieves substantial gains in pixel-level segmentation metrics and produces high-fidelity, mask-aligned anomalies. The work highlights the importance of foreground-background decoupling and region-specific adversarial feedback for effective data augmentation in industrial inspection.
Abstract
Synthesizing realistic and spatially precise anomalies is essential for enhancing the robustness of industrial anomaly detection systems. While recent diffusion-based methods have demonstrated strong capabilities in modeling complex defect patterns, they often struggle with spatial controllability and fail to maintain fine-grained regional fidelity. To overcome these limitations, we propose SARD (Segmentation-Aware anomaly synthesis via Region-constrained Diffusion with discriminative mask Guidance), a novel diffusion-based framework specifically designed for anomaly generation. Our approach introduces a Region-Constrained Diffusion (RCD) process that preserves the background by freezing it and selectively updating only the foreground anomaly regions during the reverse denoising phase, thereby effectively reducing background artifacts. Additionally, we incorporate a Discriminative Mask Guidance (DMG) module into the discriminator, enabling joint evaluation of both global realism and local anomaly fidelity, guided by pixel-level masks. Extensive experiments on the MVTec-AD and BTAD datasets show that SARD surpasses existing methods in segmentation accuracy and visual quality, setting a new state-of-the-art for pixel-level anomaly synthesis.
