Few-shot metric learning network for steel surface defect detection

In this work, a surface defect detection model based on metric learning in few shots learning is proposed from the perspective of optimal matching between image regions. Earth Mover’s Distance (EMD) is used as a measure to calculate the distance between image feature representations to determine the image correlation, so as to carry out classification and prediction, and solve the dependence of deep learning network on the number of samples. The network is composed of two parts: feature embedding module and measurement module. The feature embedding module is used to extract image features. The measurement module uses image feature vectors to calculate and realize defect image classification and detection. The experimental results show that the accuracy of one-shot, and five-shot is 70.53% and 92.86% respectively on NEU-CLS dataset; In the experiment of Kaggle data set, the accuracy of one-shot and five-shot is 85.47% and 99.98% respectively, and good defect classification and detection results are obtained. The designed model achieves a good effect of defect classification and detection, which is greatly improved compared with the traditional model, and it shows the feasibility of small sample measurement learning in the field of defect detection.