MAGIC: Few-Shot Mask-Guided Anomaly Inpainting with Prompt Perturbation, Spatially Adaptive Guidance, and Context Awareness
Not on the map. Why?
Abstract (arXiv)
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 inpainting-based 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.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 36 of its 45 references that are in the map. First posted on arXiv 3 Jul 2025.
Builds on
36 of 45 references.
References · 36
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2015U-Net: Convolutional Networks for Biomedical Image Segmentationcited by 19,713
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
- 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understandingcited by 6,355
- 2022Classifier-Free Diffusion Guidancecited by 5,847
- 2023Adding Conditional Control to Text-to-Image Diffusion Modelscited by 5,503
- 2021GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Modelscited by 3,614
- 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generationcited by 3,300
- 2022An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversioncited by 2,245
- 2013Describing Textures in the Wildcited by 2,125
- 2018Demystifying MMD GANscited by 1,293
- 2020Training Generative Adversarial Networks with Limited Datacited by 1,186
24 more
- 2021Towards Total Recall in Industrial Anomaly Detectioncited by 776
- 2018Which Training Methods for GANs do actually Converge?cited by 679
- 2021CutPaste: Self-Supervised Learning for Anomaly Detection and Localizationcited by 531
- 2021DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detectioncited by 514
- 2020U2-Net: Going Deeper with Nested U-Structure for Salient Object Detectioncited by 412
- 2022SPot-the-Difference Self-Supervised Pre-training for Anomaly Detection and Segmentationcited by 400
- 2017GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibriumcited by 213
- 2021Few-shot Image Generation via Cross-domain Correspondencecited by 207
- 2021The MVTec 3D-AD Dataset for Unsupervised 3D Anomaly Detection and Localizationcited by 178
- 2023CADS: Unleashing the Diversity of Diffusion Models through Condition-Annealed Samplingcited by 129
- 2023AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Modelcited by 111
- 2023Telling Left from Right: Identifying Geometry-Aware Semantic Correspondencecited by 86
- 2021PD-GAN: Probabilistic Diverse GAN for Image Inpaintingcited by 80
- 2021Defect-GAN: High-Fidelity Defect Synthesis for Automated Defect Inspectioncited by 77
- 2023Few-Shot Defect Image Generation via Defect-Aware Feature Manipulationcited by 67
- 2022Prototypical Residual Networks for Anomaly Detection and Localizationcited by 56
- 2024Dual-Interrelated Diffusion Model for Few-Shot Anomaly Image Generationcited by 32
- 2024SeaS: Few-shot Industrial Anomaly Image Generation with Separation and Sharing Fine-tuningcited by 27
- 2017On Convergence and Stability of GANscited by 18
- 2025DefectFill: Realistic Defect Generation with Inpainting Diffusion Model for Visual Inspectioncited by 13
- 2023DreamDistribution: Learning Prompt Distribution for Diverse In-distribution Generationcited by 10
- 2023What makes a good data augmentation for few-shot unsupervised image anomaly detection?cited by 8
- 2023A Comprehensive Augmentation Framework for Anomaly Detectioncited by 8
- 2020Few-Shot Defect Segmentation Leveraging Abundant Normal Training Samples Through Normal Background Regularization and Crop-and-Paste Operationcited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025Generate Aligned Anomaly: Region-Guided Few-Shot Anomaly Image-Mask Pair Synthesis for Industrial Inspection
- 2024AnomalySD: Few-Shot Multi-Class Anomaly Detection with Stable Diffusion Model
- 2026FLASH: A "Generate Once, Synthesize Many" Framework for Synthetic Anomaly Generation in Industrial Anomaly Detection
- 2025AnomalyPainter: Vision-Language-Diffusion Synergy for Zero-Shot Realistic and Diverse Industrial Anomaly Synthesis
- 2026MIRAGE: Model-agnostic Industrial Realistic Anomaly Generation and Evaluation for Visual Anomaly Detection
- 2026UniScale: Arbitrary-Scale Industrial Anomaly Generation
- 2026CORE: Contrast-and-Reflect for Self-Supervised Prompt Optimization in Anomaly Synthesis
- 2025Few-Shot Anomaly-Driven Generation for Anomaly Classification and Segmentation