Research on a fabric defect sample generation algorithm based on improved StyleGAN2
To address insufficient fabric defect sample data and imbalanced defect categories, DA-StyleGAN(Defect-aware and Attention-enhanced Style Generative Adversarial Network) model is proposed. Based on the StyleGAN2 network, defect-aware residual blocks are added to the generator to generate reasonable defect masks. Meanwhile, the CBAM (Convolutional Block Attention Module) is integrated into the generator to facilitate the generation of complex fabric textures and defects. In the discriminator, an additional defect-matching discriminator is employed to reduce the distance between real defect images and generated masks, ensuring the realism of defects within the mask regions. In addition, a style-balanced bias tensor is added between the mapping network and synthesis network of the generator, which alleviates imbalance in defect generation caused by model bias during GAN training. A KL divergence-based balanced loss function is further designed to constrain and balance the generation of various defect types, effectively reducing the impact caused by class imbalance. Finally, comparative analysis with existing mainstream algorithms is conducted on a self-built fabric dataset, in terms of representative defects such as weft shrinkage, stains, holes, and neps. Quantitative results demonstrate that the proposed algorithm significantly reduces noise and improves image similarity. Specifically, YOLOv11n model is evaluated on the original and augmented datasets. Experimental results illustrate that with the data augmentation by DA-StyleGAN, the detection accuracy increases by 4.1%, recall improves by 19.4%, and the mean average precision (mAP) rises by 18.9%, validating the effectiveness of the proposed algorithm in balancing defect distribution and enhancing model robustness.
Authors
- Ying Wu (ORCID: https://orcid.org/0000-0002-2051-4725)
- Jianye Wang (ORCID: https://orcid.org/0000-0001-7173-566X)
- Liu Y (ORCID: https://orcid.org/0009-0004-3901-1652)
- Panpan Zhao (ORCID: https://orcid.org/0009-0001-5943-7384)
- Peiyao Guo (ORCID: https://orcid.org/0009-0004-6225-7108)
- Xinyi Jiang
Institutions
- Zhejiang Sci-Tech University (CN)
- Sheng Jing Hospital (CN)
Publication Details
- Journal
- Journal of the Textile Institute
- Published
- 2026-07-24
- DOI
- https://doi.org/10.1080/00405000.2026.2704466
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00