ImbDef-GAN: Defect Image-Generation Method Based on Sample Imbalance
In industrial settings, defect detection using deep learning typically requires large numbers of defective samples. However, defective products are rare on production lines, creating a scarcity of defect samples and an overabundance of samples that contain only background. We introduce ImbDef-GAN, a sample imbalance generative framework, to address three persistent limitations in defect image generation: unnatural transitions at defect background boundaries, misalignment between defects and their masks, and out-of-bounds defect placement. The framework operates in two stages: (i) background image generation and (ii) defect image generation conditioned on the generated background. In the background image-generation stage, a lightweight StyleGAN3 variant jointly generates the background image and its segmentation mask. A Progress-coupled Gated Detail Injection module uses global scheduling driven by training progress and per-pixel gating to inject high-frequency information in a controlled manner, thereby enhancing background detail while preserving training stability. In the defect image-generation stage, the design augments the background generator with a residual branch that extracts defect features. By blending defect features with a smoothing coefficient, the resulting defect boundaries transition more naturally and gradually. A mask-aware matching discriminator enforces consistency between each defect image and its mask. In addition, an Edge Structure Loss and a Region Consistency Loss strengthen morphological fidelity and spatial constraints within the valid mask region. Extensive experiments on the MVTec AD dataset demonstrate that ImbDef-GAN surpasses existing methods in both the realism and diversity of generated defects. When the generated data are used to train a downstream detector, YOLOv11 achieves a 5.4% improvement in [email protected], indicating that the proposed approach effectively improves detection accuracy under sample imbalance.
Authors
- Dengbiao Jiang
- Haijian Shao (ORCID: https://orcid.org/0000-0001-5360-0788)
- Yiming Wang (ORCID: https://orcid.org/0000-0002-5932-4371)
- Nian Tao
- K. J. Zhu
Institutions
- Jiangsu University of Science and Technology (CN)
- Shanghai Construction Group (China) (CN)
Publication Details
- Journal
- Journal of Imaging
- Published
- 2025-10-16
- DOI
- https://doi.org/10.3390/jimaging11100367
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00