• CN:11-2187/TH
  • ISSN:0577-6686

机械工程学报 ›› 2025, Vol. 61 ›› Issue (8): 18-31.doi: 10.3901/JME.2025.08.018

• 仪器科学与技术 • 上一篇    下一篇

扫码分享

钢材表面缺陷轻量化识别算法研究

王祺1, 叶仁传1,2, 马国杰1, 马佩珏3, 范杰1, 杨文龙1   

  1. 1. 江苏科技大学船舶与海洋工程学院 镇江 212100;
    2. 江苏科技大学海洋学院 镇江 212100;
    3. 江南大学物联网工程学院 无锡 214122
  • 收稿日期:2024-05-04 修回日期:2024-11-09 出版日期:2025-04-20 发布日期:2025-05-10
  • 作者简介:王祺,男,1995年出生,硕士。主要研究方向为机器视觉、缺陷检测及路径规划。E-mail:209010065@stu.just.edu.cn;叶仁传(通信作者),男,1989年出生,博士,副教授,硕士研究生导师。主要研究方向为人工智能与故障检测、振动噪声分析与控制、海洋结构物运动与性能。E-mail:yrc795@126.com
  • 基金资助:
    国家自然科学基金(52001145)和江苏省研究生科研与实践创新计划(SJCX22_1963,KYCX22_3841)资助项目。

Lightweight Surface Defect Detection Method of Steel

WANG Qi1, YE Renchuan1,2, MA Guojie1, MA Peijue3, FAN Jie1, YANG Wenlong1   

  1. 1. School of Naval Architecture and Ocean Engineering, Jiangsu University of Science and Technology, Zhenjiang 212100;
    2. Ocean College, Jiangsu University of Science and Technology, Zhenjiang 212100;
    3. School of Internet of Things Engineering, Jiangnan University, Wuxi 214122
  • Received:2024-05-04 Revised:2024-11-09 Online:2025-04-20 Published:2025-05-10

摘要: 针对传统钢材表面缺陷检测方法存在检测效率低、检测精度差、实时性差等问题,提出一种基于改进YOLOv5的轻量化钢材表面缺陷识别算法,适用于低成本、低算力、低内存的硬件设备的工程部署。首先,通过K-means++算法对NEU-DET数据集重新聚类生成自适应锚框,优化先验框和真实框之间的匹配度;然后通过改进激活函数和损失函数,HardSwish激活函数降低计算成本的同时提高了稳定性,SIoU损失函数可以有效地加快了网络收敛速度;其次,为了提取目标区域的丰富的细节信息,在原始YOLOv5算法基础上添加CA坐标注意力模块;再借鉴结构重参化引入改进的Repvgg block,同时将模型通道数减半,进一步增加模型的工程部署性;最后,通过消融试验和一系列对比试验,证明本算法性能上的优越性,较YOLOv5原算法,参数量减少约73.6%,浮点计算量减少约72.3%,同时mAP值提升1.5%。研究结果为钢材表面缺陷精细化检测提供了新的方法及思路,对提高钢材产品质量具有实际意义。

关键词: 钢材表面缺陷, 深度学习, 轻量化, YOLOv5, 卷积神经网络

Abstract: Aiming at the problems of low detection efficiency, poor detection accuracy and poor real-time performance of traditional steel surface defect detection methods, An algorithm for surface defect identification of lightweight steel based on improved YOLOv5 is proposed, which is suitable for the engineering deployment of hardware equipment with low cost, low computational power and low memory. Firstly, K-means++ algorithm is used to cluster anchor boxes in the NEU-DET dataset to optimize the matching degree between the prior box and the ground-truth box. Then, by improving the activation function and loss function, HardSwish activation function reduces the computational cost and improves the stability at the same time, while SIoU loss function can effectively accelerate the convergence speed of the network. Secondly, in order to extract rich details of the target region, the CA coordinate attention module is added on the basis of the original YOLOv5 algorithm. Furthermore, the improved Repvgg block is introduced by referring to the structure reparameterization, and the number of model channels is halved to further increase the engineering deployability of the model. Finally, through ablation experiment and a series of comparative experiments, the performance of the proposed algorithm is proved to be superior. Compared with the original YOLOv5 algorithm, the number of parameters is reduced by about 73.6%, the floating point calculation is reduced by about 72.3%, and the mAP value is increased by 1.5%. The results provide a new method and idea for the fine inspection of steel surface defects and have practical significance for improving the quality of steel products.

Key words: steel surface defect, deep learning, light weight, YOLOv5, convolutional neural network

中图分类号: