MAGIC: Few-Shot Mask-Guided Anomaly Inpainting with Prompt Perturbation, Spatially Adaptive Guidance, and Context Awareness

Citations

SCOPUS

1

초록

Few-shot anomaly generation is a key challenge in industrial quality control. Although diffusion models are promising, existing methods struggle: global prompt-guided approaches corrupt normal regions, and existing inpaintingbased methods often lack the in-distribution diversity essential for robust downstream models. We propose MAGIC, a fine-tuned inpainting framework that generates high-fidelity anomalies that strictly adhere to the mask while maximizing this diversity. MAGIC introduces three complementary components: (i) Gaussian prompt perturbation, which prevents model overfitting in the few-shot setting by learning and sampling from a smooth manifold of realistic anomalies, (ii) spatially adaptive guidance that applies distinct guidance strengths to the anomaly and background regions, and (iii) context-aware mask alignment to relocate masks for plausible placement within the host object. Under consistent identical evaluation protocol, MAGIC outperforms state-of-the-art methods on diverse anomaly datasets in downstream tasks. Code is available at https://github.com/SpatialAILab/MAGIC.

키워드

anomaly generation; diffusion model; industrial anomaly detection; inpainting; mask-guided; Information management; Masks; Quality control
제목
MAGIC: Few-Shot Mask-Guided Anomaly Inpainting with Prompt Perturbation, Spatially Adaptive Guidance, and Context Awareness
저자
Choi, Jae Hyuck; Kim, Minjun; Hong, Je Hyeong
DOI
10.1109/CVPRF71909.2026.00818
발행일
2026-06
유형
Conference paper
저널명
Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition
페이지
8525 ~ 8534