Abstract
Surface defect recognition (SDC) is essential in intelligent manufacturing. Deep Learning (DL) is a research hotspot in SDC. Limited defective samples are available in most real-world cases, which poses challenges for DL methods. Given such circumstances, generating defective samples by generative adversarial networks (GAN) is applied. However, insufficient samples and high-frequency texture details in defects make GANs very hard to train, yield mode collapse and poor image quality, which can further impact SDC. To solve these problems, this paper proposes a new generative adversarial network called Contrastive GAN, which can be trained to generate diverse defects with only extremely limited samples. Specifically, a Shared Data Augmentation (SDA) module is proposed for avoiding overfitting. Then, a Feature Attention Matching (FAM) module is proposed to align features for improving the quality of generated images. Finally, a Contrastive Loss based on Hyper Sphere is employed to constrain GAN to generate images differ from traditional transform. Experiments show that the proposed GAN generates defective images with higher quality and lower variance between real defects compared to other GANs. Synthetic images contribute to pre-trained DL networks with accuracies of up to 95.00%-99.56% for NEU datasets of different sizes and 91.84% for PCB cases, which proves the effectiveness of the proposed method.
Funding Information
  • National Natural Science Foundation of China (52188102, U21B2029)

This publication has 27 references indexed in Scilit: