Abstract:The performance of fabric defect detection models heavily relies on a sufficient quantity of diverse and high-quality samples. However, data collection is costly, and class distributions are often imbalanced, which severely restricts the model’s generalization ability. To address this issue, this study proposes a fabric defect image generation method based on parallel hybrid attention and multi-scale frequency-domain loss. First, a parallel hybrid attention mechanism is introduced into the local generator, which adaptively fuses spatial gating attention and channel attention to enhance defect localization accuracy and improve the representation of key features. Second, a multi-scale frequency-domain loss is proposed to constrain both amplitude and phase, and it is combined with perceptual loss to better reconstruct high-frequency fabric textures. Finally, self-attention is embedded into the discriminator to capture long-range dependencies and enhance the global structural consistency of the generated images. Experimental results on a self-built dataset show that the proposed method achieves SSIM, PSNR, and LPIPS values of 0.964, 32.797 dB, and 0.085, respectively, outperforming existing methods in perceptual quality and detail fidelity. By comparing detection performance before and after data augmentation, the average precision of YOLOv5, YOLOv8, DEIM, and D-FINE improves by 1.4%, 1.2%, 1.1%, and 0.8%, respectively.