A New Cycle-consistent Adversarial Networks With Attention Mechanism for Surface Defect Classification With Small Samples

Surface defect detection is the essential process to ensure the quality of products. Surface defect classification (SDC) based on deep learning (DL) has shown its great potential. However, the well-trained SDC model usually requires large training data, and the small intraclass differences between the defect and normal samples also degrades the performance of SDC model. To overcome these drawbacks, this article proposed a new cycle-consistent adversarial networks with attention mechanism (AttenCGAN). First, AttenCGAN is used for synthesizing defect samples to enlarge the samples volume. Second, the attention mechanism is adopted for the feature enhancement by finding the discriminative parts of the samples and enlarging the differences among the samples. AttenCGAN is tested on KolektorSDD and DAGM2007 datasets, and its accuracies are 98.53% and 99.57% with only a few samples. The experiment results show that AttenCGAN outperforms other published SDC methods based on DL and machine learning, which validates its potential.