Diffusion-based Image Generation for In-distribution Data Augmentation in Surface Defect Detection
On the map: Diffusion models → Flow matching, time series and science
Abstract (arXiv)
In this study, we show that diffusion models can be used in industrial scenarios to improve the data augmentation procedure in the context of surface defect detection. In general, defect detection classifiers are trained on ground-truth data formed by normal samples (negative data) and samples with defects (positive data), where the latter are consistently fewer than normal samples. For these reasons, state-of-the-art data augmentation procedures add synthetic defect data by superimposing artifacts to normal samples. This leads to out-of-distribution augmented data so that the classification system learns what is not a normal sample but does not know what a defect really is. We show that diffusion models overcome this situation, providing more realistic in-distribution defects so that the model can learn the defect's genuine appearance. We propose a novel approach for data augmentation that mixes out-of-distribution with in-distribution samples, which we call In&Out. The approach can deal with two data augmentation setups: i) when no defects are available (zero-shot data augmentation) and ii) when defects are available, which can be in a small number (few-shot) or a large one (full-shot). We focus the experimental part on the most challenging benchmark in the state-of-the-art, i.e., the Kolektor Surface-Defect Dataset 2, defining the new state-of-the-art classification AP score under weak supervision of .782. The code is available at https://github.com/intelligolabs/in_and_out.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Placed in Flow matching, time series and science, one of 14 directions in Diffusion models. Builds on 12 of its 17 references that are in the map. First posted on arXiv 1 Jun 2024.
Builds on
12 of 17 references.
References · 12
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2020Denoising Diffusion Probabilistic Modelscited by 20,851
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,185
- 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,005
- 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generationcited by 3,286
- 2021DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detectioncited by 510
- 20218-bit Optimizers via Block-wise Quantizationcited by 395
- 2021Mixed supervision for surface-defect detection: from weakly to fully supervised learningcited by 101
- 2022MemSeg: A semi-supervised method for image surface defect detection using differences and commonalitiescited by 68
- 2022Prototypical Residual Networks for Anomaly Detection and Localizationcited by 56
Built on by
Citing papers per year: 2024: 3; 2025: 3; 2026: 3.
9 papers.
- 2024Leveraging Latent Diffusion Models for Training-Free In-Distribution Data Augmentation for Surface Defect Detectioncited by 8
- 2024Self-Supervised Iterative Refinement for Anomaly Detection in Industrial Quality Controlcited by 5
- 2025KairosAD: A SAM-Based Model for Industrial Anomaly Detection on Embedded Devicescited by 2
- 2026TinyGLASS: Real-Time Self-Supervised In-Sensor Anomaly Detectioncited by 2
- 2026Text2Arch: A Dataset for Generating Scientific Architecture Diagrams from Natural Language Descriptionscited by 1
- 2024MDiFF: Exploiting Multimodal Score-based Diffusion Models for New Fashion Product Performance Forecastingcited by 0
- 2025ExDD: Explicit Dual Distribution Learning for Surface Defect Detection via Diffusion Synthesiscited by 0
- 2025RoadFusion: Latent Diffusion Model for Pavement Defect Detectioncited by 0
- 2026LiZAD: A Lightweight Zero-Shot Anomaly Detection Framework for Industrial Manufacturingcited by 0
- 2026LiZAD: A Lightweight Zero-Shot Anomaly Detection Framework for Industrial Manufacturing2 Jul 2026
- 2026Text2Arch: A Dataset for Generating Scientific Architecture Diagrams from Natural Language Descriptions16 Apr 2026
- 2026TinyGLASS: Real-Time Self-Supervised In-Sensor Anomaly Detection17 Mar 2026
- 2025RoadFusion: Latent Diffusion Model for Pavement Defect Detection21 Jul 2025
- 2025ExDD: Explicit Dual Distribution Learning for Surface Defect Detection via Diffusion Synthesis21 Jul 2025
- 2025KairosAD: A SAM-Based Model for Industrial Anomaly Detection on Embedded Devices30 May 2025
- 2024MDiFF: Exploiting Multimodal Score-based Diffusion Models for New Fashion Product Performance Forecasting7 Dec 2024
- 2024Self-Supervised Iterative Refinement for Anomaly Detection in Industrial Quality Control21 Aug 2024
- 2024Leveraging Latent Diffusion Models for Training-Free In-Distribution Data Augmentation for Surface Defect Detection4 Jul 2024
Similar, not cited
Close in wording, no citation either way
- 2024Defect Image Sample Generation With Diffusion Prior for Steel Surface Defect Recognition
- 2024DefFiller: Mask-Conditioned Diffusion for Salient Steel Surface Defect Generation
- 2026Industrial Surface Defect Detection via Diffusion Generation and Asymmetric Student-Teacher Network
- 2024Ali-AUG: Innovative Approaches to Labeled Data Augmentation using One-Step Diffusion Model
- 2025Enhancing Glass Defect Detection with Diffusion Models: Addressing Imbalanced Datasets in Manufacturing Quality Control
- 2025DefectFill: Realistic Defect Generation with Inpainting Diffusion Model for Visual Inspection
- 2025Semi-Supervised Defect Detection via Conditional Diffusion and CLIP-Guided Noise Filtering
- 2024A Novel Approach to Industrial Defect Generation through Blended Latent Diffusion Model with Online Adaptation