一种改进YOLOv5s的金属表面缺陷检测算法研究
CSTR:
作者:
作者单位:

重庆交通大学 机电与车辆工程学院,重庆400074

作者简介:

安治国(1976—),男,副教授,主要从事深度学习机器视觉检测算法的研究,(E-mail)anzhiguo@cqjtu.edu.cn。

通讯作者:

中图分类号:

基金项目:

重庆市自然科学基金(cstc2021jcyj-msxmX1047)。


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

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

Fund Project:

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

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    金属零部件大量应用于生产生活的等各个领域,但其表面缺陷分布不均匀且部分特征微弱,常常造成金属零件表面缺陷检测的漏检和误检。针对这一问题,研究提出一种YOLOv5s-MD(you only look once-modified detection)算法。针对金属表面缺陷特征成分复杂的问题,引入改进的空间金字塔池化模块以提高算法对不同尺度微小目标的深度特征提取能力。针对金属表面缺陷特征分散及计算量增大问题,加入轻量化注意力机制及GSConv模块,提高模型对不同尺度缺陷特征的有效获取。考虑到金属表面缺陷尺寸信息无规律导致边界回归不匹配问题,采用考虑向量角度的损失函数。结果表明,提出的YOLOv5s-MD算法在对金属表面缺陷检测时,检测平均精度mAP@0.5达到75.3%,能够有效提升检测精度,降低误检率。

    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.

    参考文献
    相似文献
    引证文献
引用本文

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

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-11-08
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2026-04-21
  • 出版日期:
文章二维码