DefectFill: Realistic Defect Generation with Inpainting Diffusion Model for Visual Inspection
About
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.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Anomaly Localization | MVTec-AD (test) | Pixel AUROC100 | 181 | |
| Anomaly Classification | MVTec-AD (test) | -- | 50 | |
| Image-level Anomaly Detection | MVTec AD pill | -- | 10 | |
| Defect Generation | MVTec AD bottle v1 (test) | KID30.99 | 4 | |
| Defect Generation | MVTec AD capsule v1 (test) | KID5.6 | 4 | |
| Defect Generation | MVTec AD hazelnut v1 (test) | KID1.13 | 4 | |
| Defect Generation | MVTec AD leather v1 (test) | KID74.66 | 4 | |
| Defect Generation | MVTec AD pill v1 (test) | KID8.76 | 4 | |
| Defect Generation | MVTec AD tile v1 (test) | KID45.14 | 4 | |
| Defect Generation | MVTec AD toothbrush v1 (test) | KID3.19 | 4 |