Electronic Science and Technology ›› 2024, Vol. 37 ›› Issue (12): 48-55.doi: 10.16180/j.cnki.issn1007-7820.2024.12.008

Previous Articles     Next Articles

Improvement of YOLOv5s Algorithm for Steel Surface Defect Detection

CUI Jingnan, HUANG Chunyan, LI Yanling   

  1. School of Mathematics and Statistics,North China University of Water Resources and Electric Power, Zhengzhou 450046,China
  • Received:2023-04-27 Online:2024-12-15 Published:2024-12-16
  • Supported by:
    Science and Technology Project of Henan(212102310306)

Abstract:

In view of the problems such as low accuracy and slow recognition speed of existing steel surface defect detection methods, a defect detection method based on improved YOLOv5s(You Only Look Once version 5s) is proposed in this study. CBAM(Convolutional Block Attention Module) attention mechanism is introduced into the backbone feature extraction network to pay attention to the information of important regions and improve the model's learning ability of target defects. In order to improve the regression speed and localization accuracy of the target frame, the EIoU(Efficient Intersection over Union) boundary frame loss function combining distance loss and width-height loss are used to calculate the loss value. Transfer learning is used to accelerate the convergence speed of the model to improve the accuracy of defects detection. The experimental results on the data set NEU-DET show that compared with the original YOLOv5s network, the improved YOLOv5s network of the accuracy rate of the data set increased by 6.3 percentage point, the recall rate increased by 9.2 percentage point, and the mAP(mean Average Precision) reached 81.7%, which indicates the improved method has good performance for the detection of steel surface defects. The size of the steel surface defect detection model with the improved YOLOv5s algorithm is only 13.8 MB, which improves the detection accuracy on the basis of real-time performance and facilitates the deployment of the model in practical applications.

Key words: deep learning, convolutional neural networks, YOLOv5s, attention mechanism, loss function, transfer learning, target detection, defect detection

CLC Number: 

  • TP391.41