DefectFill: Realistic Defect Generation with Inpainting Diffusion Model for Visual Inspection
Authors:
- 10 June 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 18718-18727
Abstract
Developing effective visual inspection models remains challenging due to the scarcity of defect data. While image generation models have been used to synthesize defect images, producing highly realistic defects remains difficult. We propose DefectFill, a novel method for realistic defect generation that requires only a few reference defect images. It leverages a fine-tuned inpainting diffusion model, optimized with our custom loss functions incorporating defect, object, and attention terms. It enables precise capture of detailed, localized defect features and their seamless integration into defect-free objects. Additionally, our Low-Fidelity Selection method further enhances the defect sample quality. Experiments show that DefectFill generates high-quality defect images, enabling visual inspection models to achieve state- of-the-art performance on the MVTec AD dataset.Keywords
All Related Versions
Funding Information
- National Research Foundation of Korea
- Seoul National University
This publication has 30 references indexed in Scilit:
- Towards Total Recall in Industrial Anomaly Detection2022
- High-Resolution Image Synthesis with Latent Diffusion Models2022
- Few-shot Image Generation via Cross-domain Correspondence2021
- CutPaste: Self-Supervised Learning for Anomaly Detection and Localization2021
- Analyzing and Improving the Image Quality of StyleGAN2020
- Automated detection of defects with low semantic information in X-ray images based on deep learningJournal of Intelligent Manufacturing, 2020
- MVTec AD — A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection2019
- The Unreasonable Effectiveness of Deep Features as a Perceptual Metric2018
- Deep Residual Learning for Image Recognition2016
- U-Net: Convolutional Networks for Biomedical Image Segmentation2015