Computer and Modernization ›› 2021, Vol. 0 ›› Issue (06): 61-68.

Previous Articles     Next Articles

Surface Defect Detection Based on Improved Deep Metric Learning Algorithm

  

  1. (1. College of Mechanical and Electrical Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing
    210016, China; 2. Wuxi Institute, Nanjing University of Aeronautics and Astronautics, Wuxi 214187, China)
  • Online:2021-07-05 Published:2021-07-05

Abstract: An algorithm based on deep metric learning is proposed for the surface defect detection of small batches and multiple varieties of industrial products. The algorithm improves the VGG16 network model, which is more suitable for mapping the original image to the latent space; for the task of product surface defect detection, a conditional triplet loss function is proposed to strengthen the fitting ability of neural network. When the defect is judged in the latent space, the classification model based on the KNN algorithm in the original metric learning algorithm is discarded, and the classification method based on the Gaussian distribution probability is proposed. When new types of products are detected, on the basis of the trained network model, the network is finely tuned by using the image data of the new product as input. Through the above improvements to the deep metric learning algorithm for the defect detection task, after K-Fold cross-validation on the button defect data set, the accuracy on different query sets is over 90%, and the highest can reach 99.89%, by providing 50 non-defective samples and 50 defective samples for training the network. And compared with traditional deep metric learning algorithms, the accuracy is increased by about 10%. The experimental results show that the improved deep metric learning algorithm can well solve the surface defect detection problem of small batch and multi-variety industrial products.

Key words: surface quality, vision detection, neural network, deep metric learning, few-shot learning, conditional triplet loss, Gaussian distribution