mlsanityData to 14 Oct 2026

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

arXiv 2507.02314 ↗First posted 3 Jul 2025cs.CV cs.AIcited by 1

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

  1. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  2. 2015U-Net: Convolutional Networks for Biomedical Image Segmentationcited by 19,713
  3. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
  4. 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understandingcited by 6,355
  5. 2022Classifier-Free Diffusion Guidancecited by 5,847
  6. 2023Adding Conditional Control to Text-to-Image Diffusion Modelscited by 5,503
  7. 2021GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Modelscited by 3,614
  8. 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generationcited by 3,300
  9. 2022An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversioncited by 2,245
  10. 2013Describing Textures in the Wildcited by 2,125
  11. 2018Demystifying MMD GANscited by 1,293
  12. 2020Training Generative Adversarial Networks with Limited Datacited by 1,186
24 more
  1. 2021Towards Total Recall in Industrial Anomaly Detectioncited by 776
  2. 2018Which Training Methods for GANs do actually Converge?cited by 679
  3. 2021CutPaste: Self-Supervised Learning for Anomaly Detection and Localizationcited by 531
  4. 2021DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detectioncited by 514
  5. 2020U2-Net: Going Deeper with Nested U-Structure for Salient Object Detectioncited by 412
  6. 2022SPot-the-Difference Self-Supervised Pre-training for Anomaly Detection and Segmentationcited by 400
  7. 2017GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibriumcited by 213
  8. 2021Few-shot Image Generation via Cross-domain Correspondencecited by 207
  9. 2021The MVTec 3D-AD Dataset for Unsupervised 3D Anomaly Detection and Localizationcited by 178
  10. 2023CADS: Unleashing the Diversity of Diffusion Models through Condition-Annealed Samplingcited by 129
  11. 2023AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Modelcited by 111
  12. 2023Telling Left from Right: Identifying Geometry-Aware Semantic Correspondencecited by 86
  13. 2021PD-GAN: Probabilistic Diverse GAN for Image Inpaintingcited by 80
  14. 2021Defect-GAN: High-Fidelity Defect Synthesis for Automated Defect Inspectioncited by 77
  15. 2023Few-Shot Defect Image Generation via Defect-Aware Feature Manipulationcited by 67
  16. 2022Prototypical Residual Networks for Anomaly Detection and Localizationcited by 56
  17. 2024Dual-Interrelated Diffusion Model for Few-Shot Anomaly Image Generationcited by 32
  18. 2024SeaS: Few-shot Industrial Anomaly Image Generation with Separation and Sharing Fine-tuningcited by 27
  19. 2017On Convergence and Stability of GANscited by 18
  20. 2025DefectFill: Realistic Defect Generation with Inpainting Diffusion Model for Visual Inspectioncited by 13
  21. 2023DreamDistribution: Learning Prompt Distribution for Diverse In-distribution Generationcited by 10
  22. 2023What makes a good data augmentation for few-shot unsupervised image anomaly detection?cited by 8
  23. 2023A Comprehensive Augmentation Framework for Anomaly Detectioncited by 8
  24. 2020Few-Shot Defect Segmentation Leveraging Abundant Normal Training Samples Through Normal Background Regularization and Crop-and-Paste Operationcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025Generate Aligned Anomaly: Region-Guided Few-Shot Anomaly Image-Mask Pair Synthesis for Industrial Inspection
  2. 2024AnomalySD: Few-Shot Multi-Class Anomaly Detection with Stable Diffusion Model
  3. 2026FLASH: A "Generate Once, Synthesize Many" Framework for Synthetic Anomaly Generation in Industrial Anomaly Detection
  4. 2025AnomalyPainter: Vision-Language-Diffusion Synergy for Zero-Shot Realistic and Diverse Industrial Anomaly Synthesis
  5. 2026MIRAGE: Model-agnostic Industrial Realistic Anomaly Generation and Evaluation for Visual Anomaly Detection
  6. 2026UniScale: Arbitrary-Scale Industrial Anomaly Generation
  7. 2026CORE: Contrast-and-Reflect for Self-Supervised Prompt Optimization in Anomaly Synthesis
  8. 2025Few-Shot Anomaly-Driven Generation for Anomaly Classification and Segmentation