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

Jaewoo Song, Daemin Park, Kanghyun Baek, Sangyub Lee, Jooyoung Choi +2 more
2/10/2026

No confident code implementation found for this paper. 1 possible match can be shown below.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{song2026defectfill,
  title  = {DefectFill: Realistic Defect Generation with Inpainting Diffusion Model for Visual Inspection},
  author = {Jaewoo Song and Daemin Park and Kanghyun Baek and Sangyub Lee and Jooyoung Choi and Eunji Kim and Sungroh Yoon},
  year   = {2026},
  eprint = {2503.13985},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2503.13985},
  journal = {CVPR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.13985.svg)](https://codeofpaper.com/paper/2503.13985)

Discussion