journal article·2026-07-24

Research on a fabric defect sample generation algorithm based on improved StyleGAN2

Yanping Liu, Jianye Wang, Xinyi Jiang, Peiyao Guo, Panpan Zhao, Ying Wu

Publisher page

Abstract

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.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Industrial Vision Systems and Defect Detection · Advanced Neural Network Applications · Textile materials and evaluations

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

School of Fashion Design & Engineering, Zhejiang Sci-Tech University

Shengzhou Innovation Research Institute, Zhejiang Sci-Tech University, Shengzhou, China

Digital Intelligence Style and Creative Design Research Center, Key Research Center of Philosophy and Social Sciences, Zhejiang Sci-Tech University

Funding

Zhejiang Provincial Philosophy and Social Sciences Planning Project · Fundamental Research Funds of Zhejiang Sci-Tech University · Scientific Research Fund of Zhejiang Provincial Education Department · Outstanding Graduate Thesis Cultivation Fund of Zhejiang Sci-Tech University

References (22)

Show source-provided references
1. Arjovsky, M. (2017). Wasserstein generative adversarial networks[C]//International conference on machine learning. new York: ACM, 214–223.
2. Belousov S. (2021) MobileStyleGAN: A lightweight convolutional neural network for high-fidelity image synthesis[J]. arXiv 2104.04767.
3. Bergmann, P., Fauser, M., Sattleger, D., et al. (2019). Mvtec AD–A comprehensive real-world dataset for unsupervised anomaly detection[C]//Proceedings of the IEEE/cvf conference on computer vision and pattern recognition. piscataway: ieee, 9592–9600.
4. Chan, C.-H., & Pang, G. K. (2000). Fabric defect detection by Fourier analysis. [J]IEEE Transactions on Industry Applications, 36(5), 1267–1276.10.1109/28.871274 ↗
5. Duan, Y. (2023). Few-shot defect image generation via defect-aware feature manipulation[C]//Proceedings of the 37th AAAI Conference on Artificial Intelligence (AAAI). Menlo Park: AAAI Press, 37(1): 571–578. https://doi.org/10.1609/aaai.v37i1.25132
6. Fang, H., Han, B., Zhang S., et al. (2024). Data augmentation for object detection via controllable diffusion models[C]//Proceedings of the IEEE/CVF winter conference on applications of computer vision. Piscataway: IEEE, 1257–1266.
7. Goodfellow I. Pouget-Abadie J. Mirza M. Xu B. Warde-Farley D. Ozair S. Courville A. & Bengio Y. (2014). Generative adversarial nets. [C]//Advances in Neural Information Processing Systems 27 2672–2680.
8. 10.3390/rs1613231210.3390/rs16132312 ↗
9. Karras, T. (2019). A style-based generator architecture for generative adversarial networks[C]//IEEE/CVF conference on computer vision and pattern recognition (CVPR). Piscataway: IEEE, 4401–4410.
10. Karras, T. (2020). Analyzing and improving the image quality of StyleGAN [C]//IEEE/CVF conference on computer vision and pattern recognition (CVPR). Piscataway: IEEE, 8110–8119.
11. Karras, T., Aittala, M., Laine, S., et al. (2021). Alias-free generative adversarial networks. [J]Advances in Neural Information Processing Systems, 34, 852–863.
12. Karras, T., Laine, S., Aittala, M., et al. (2020). Analyzing and improving the image quality of StyleGAN [C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. Piscataway: IEEE, 8110–8119.
13. Li, Y., Dong, X., Chen, C., et al. (2024). A simple background augmentation method for object detection with diffusion model[C]//European conference on computer Berlin: Springer, 462–479.
14. Liu, Y., Guo, P., & Wu, Y. (2024). Research progress on the application of deep learning technology for fabric defect detection. [J]Journal of Textile Research, 45(12), 234–242.
15. Lü, W., Lin, Q., Zhong, J., et al. (2021). Research progress of image processing technology for fabric defect detection. [J]J. Tex. Res, 42(11), 197–206.
16. Mirza M. & Osindero S. (2014). Conditional generative adversarial nets[J/OL].arXiv 1411.1784.
17. Radford A. Metz L. & Chintala S. (2016). Unsupervised representation learning with deep convolutional generative adversarial networks[J/OL]. arXiv 1511.06434.
18. Tan S. Shen Y. & Zhou B. (2020) Improving the fairness of deep generative models without retraining [J/OL]. arXiv 2012.04842
19. 10.1109/TIP.2021.304934610.1109/TIP.2021.3049346 ↗
20. Woo, S., Park, J., Lee, J. Y., et al. (2018). Cbam: Convolutional block attention module[C]//Proceedings of the European conference on computer vision (ECCV). Berlin: Springer. 3–19.
21. Zhao, L., Zhang, Z., Chen, T., et al. (2021). Improved transformer for high-resolution GANs. [J]Advances in Neural Information Processing Systems, 34, 18367–18380.
22. Zhu J Y, PARK. T., & Isola, P., et al. (2017). Unpaired image-to-image translation using cycle-consistent adversarial networks[C]//Proceedings of the IEEE international conference on computer vision.IEEE 2223–2232.