# DefectFill: Realistic Defect Generation with Inpainting Diffusion Model for Visual Inspection

**Authors:** Jaewoo Song, Daemin Park, Kanghyun Baek, Sangyub Lee, Jooyoung Choi, Eunji Kim, Sungroh Yoon  
**arXiv:** [2503.13985](https://arxiv.org/abs/2503.13985)  
**Date:** 2025-03-18  
**Summary page:** https://www.summarizepaper.com/en/paper/2503.13985v1/

## Key points

- Limited availability of defect data hinders the development of effective visual inspection models
- Previous approaches have used image generation models to create synthetic defect images, but realism has been a challenge
- Introducing a novel method for generating realistic defects using a small number of reference images
- Leveraging an inpainting diffusion model with custom loss functions to capture intricate and localized defect features
- Including a Low-Fidelity Selection technique to enhance the quality of generated defect samples
- Experimental results demonstrate high-quality defect images and state-of-the-art performance in visual inspection models
- Potential to significantly improve accuracy and reliability in various industrial applications

## Summary

In the field of visual inspection, the development of effective models is hindered by the limited availability of defect data. Previous approaches have utilized image generation models to create synthetic defect images, but achieving a high level of realism in these defects has proven challenging. To address this issue, we introduce , a novel method for generating realistic defects using just a small number of reference images. Our approach leverages a finely-tuned inpainting diffusion model optimized with custom loss functions that incorporate defect, object, and attention terms. This allows for precise capture of intricate and localized defect features while seamlessly integrating them into defect-free objects. Additionally, our method includes a Low-Fidelity Selection technique that further enhances the quality of generated defect samples. Experimental results on the  demonstrate that  produces high-quality defect images and achieves state-of-the-art performance in visual inspection models. This advancement not only showcases the effectiveness of our approach but also highlights its potential to significantly improve accuracy and reliability in various industrial applications.
