一种改进YOLOv5s的金属表面缺陷检测算法研究

  • 打印
  • 收藏
收藏成功


打开文本图片集

中图分类号:TP391.4 文献标志码:A 文章编号:1000-582X(2026)04-098-09

doi:10.11835/j.issn.1000-582X.2026.02.009

A detection algorithm based on YOLOv5s for metal surface defects

AN Zhiguo,XIAN Qinglin,XU Liang (School of Mechatronics and Vehicle Engineering,Chongqing Jiaotong University, Chongqing 400074,P.R. China)

Abstract:Metal parts are widely used in various fields,and their surface defects usually distribute unevenly and some characteristics are weak,which often causes missng and false detection.To solve this problem,aYOLOv5sMD 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 effctively extract defect features at diferent sizes.For the boundaryregresson mismatchcaused by irregularsize informationofmetal 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

reducethefalsedetectionrateformetal surfacedefects.

Keywords: metal surface defect; detection algorithm; YOLOv5s; deep learning

金属零部件大量应用于航空航天、军事装备、3C电子及生活日用品等领域。(剩余9352字)

monitor