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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Ying Wu, Jianye Wang, Liu Y, Panpan Zhao et al.
Journal of the Textile Institute
Industrial Vision Systems and Defect Detection
article

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

Ying Wu, Jianye Wang, Liu Y, Panpan Zhao, Peiyao Guo, Xinyi Jiang
article en

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.

Journal of the Textile Institute
Zhejiang Sci-Tech University (CN), Sheng Jing Hospital (CN)
Reduced inequalities
Openalex Percentile: Top 8%
Industrial Vision Systems and Defect Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.