A detection algorithm based on YOLOv5s for metal surface defects
CSTR:
Author:
Affiliation:

School of Mechatronics and Vehicle Engineering, Chongqing Jiaotong University, Chongqing 400074, P. R. China

Clc Number:

Fund Project:

Supported by Chongqing Natural Science Foundation (cstc2021jcyj-msxmX1047).

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    Metal parts are widely used in various fields, and their surface defects usually distribute unevenly and some characteristics are weak, which often causes missing and false detection. To solve this problem, a YOLOv5s-MD algorithm is proposed. Aiming at the problem of complex features of metal surface defects, an improved spatial pyramid pooling module is introduced to improve the deep feature extraction for small targets of different sizes. To address the problem of feature dispersion and calculation increase, a lightweight attention mechanism and the GSConv module are added to improve the model’s ability to effectively extract defect features at different sizes. For the boundary regression mismatch caused by irregular size information of metal surface defects, a loss function considering vector angle is adopted. The results show that the YOLOv5s-MD algorithm has an average accuracy of 75.3% in metal surface defect detection, which can effectively increase the detection accuracy and reduce the false detection rate for metal surface defects.

    Reference
    Related
    Cited by
Get Citation

安治国,鲜青霖,许亮.一种改进YOLOv5s的金属表面缺陷检测算法研究[J].重庆大学学报,2026,49(4):98~106

Copy
Related Videos

Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:November 08,2023
  • Revised:
  • Adopted:
  • Online: April 21,2026
  • Published:
Article QR Code