[1]燕 雨,荆宇超,史孟翔,等.基于改进 YOLOv5 算法的钢材表面缺陷检测[J].郑州大学学报(工学版),2025,46(04):93-99.[doi:10.13705/j.issn.1671-6833.2025.01.007]
 YAN Yu,JING Yuchao,SHI Mengxiang,et al.Steel Surface Defect Detection Based on Improved YOLOv5 Algorithm[J].Journal of Zhengzhou University (Engineering Science),2025,46(04):93-99.[doi:10.13705/j.issn.1671-6833.2025.01.007]
点击复制

基于改进 YOLOv5 算法的钢材表面缺陷检测()
分享到:

《郑州大学学报(工学版)》[ISSN:1671-6833/CN:41-1339/T]

卷:
46
期数:
2025年04期
页码:
93-99
栏目:
出版日期:
2025-07-10

文章信息/Info

Title:
Steel Surface Defect Detection Based on Improved YOLOv5 Algorithm
文章编号:
1671-6833(2025)04-0093-07
作者:
燕 雨 荆宇超 史孟翔 杨 朵
郑州大学 电气与信息工程学院,河南 郑州 450001
Author(s):
YAN Yu JING Yuchao SHI Mengxiang YANG Duo
School of Electrical and Information Engineering, Zhengzhou University, Zhengzhou 450001, China
关键词:
YOLOv5 自适应辅助分支 注意力机制 损失函数
Keywords:
YOLOv5 adaptive auxiliary branches attention mechanism loss function
分类号:
TP391
DOI:
10.13705/j.issn.1671-6833.2025.01.007
文献标志码:
A
摘要:
为了解决钢铁缺陷检测效率低下和因误检造成的经济损失问题,提出了用于钢材缺陷检测的 YOLOv5 改进算法。 在保持原 YOLOv5 检测层不变的情况下,新增加 3 条自适应权重的辅助分支,用于提取 YOLOv5 网络的浅层信息,同时辅助分支也可以增强整体网络的梯度流动,使得训练效果更好;在网络的主干部分加入 EMA 注意力机制,经过 EMA 模块加权后的特征信息可以帮助模型更好地关注和理解重要的目标特征;使用 SIoU 代替了 CIoU损失函数,SIoU 引入的角度损失和形状损失可以使锚框在回归过程更加快速准确,提高检测的稳定性和鲁棒性。通过对 NEU-DET 数据集的实验,所提的改进算法相比原 YOLOv5s 精确率提高了 3. 7 百分点,相比其他主流算法也拥有更好的检测性能。
Abstract:
In order to solve the problem of low efficiency of steel defect detection and economic loss caused by false detection, an improved YOLOv5 algorithm was proposed for steel defect detection. On the condition of keeping the original YOLOv5 detection layer unchanged, three auxiliary branches with adaptive weights to extract the shallow information of the YOLOv5 network were added to the improved algortihm, and the auxiliary branches could also enhance the gradient flow of the whole network, which made the training effect better. The EMA attention mechanism was added to the main part of the network, and the weighted feature information of the EMA module could help the model better focus on and understand the important target features. SIoU was used instead of the CIoU loss function, and the angle loss and shape loss introduced by SIoU could make the anchor frame fast and accurate in the regression process to improve the stability and robustness of the detection. Through experiments on the NEUDET dataset, the proposed algorithm improved the accuracy by 3. 7 percentage points compared with the original YOLOv5s, with better detection performance than other mainstream algorithms.

参考文献/References:

[1] WEN X, SHAN J, HE Y, et al. Steel surface defect recognition: a survey[J]. Coatings, 2023, 13(1):1-30. 

[2] 刘杰. 探究钢铁表面缺陷检测的研究与实现[ J] . 中 国设备工程, 2023(6) : 172-174. 
LIU J. Research and implementation of steel surface defect detection[J]. China Plant Engineering, 2023(6): 172-174. 
[3] KRIZHEVSKY A, SUTSKEVER I, HINTON G E. ImageNet classification with deep convolutional neural networks[ J]. Communications of the ACM, 2017, 60(6): 84-90. 
[4] SIMONYAN K, ZISSERMAN A. Very deep convolutional networks for large-scale image recognition [ EB / OL ] . (2015- 04 - 10 ) [ 2024 - 08 - 19 ] . https:∥arxiv. org / abs/ 1409. 1556. 
[5] SZEGEDY C, LIU W, JIA Y Q, et al. Going deeper with convolutions [ C] ∥2015 IEEE Conference on Computer Vision and Pattern Recognition ( CVPR) . Piscataway: IEEE, 2015: 1-9. 
[6] HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition [ C] ∥2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) . Piscataway: IEEE, 2016: 770-778. 
[7] HOWARD A G, ZHU M L, CHEN B, et al. MobileNets: efficient convolutional neural networks for mobile vision applications [ EB / OL] . ( 2017 - 04 - 19) [ 2024 - 08-19] . http:∥arxiv. org / abs/ 1704. 04861. 
[8] LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot multibox detector[C]∥14th European Conference on Computer Vision. Cham: Springer, 2016: 21-37. 
[9] REDMON J, FARHADI A. YOLOv3: an incremental improvement[ EB / OL] . ( 2018 - 04 - 08) [ 2024 - 08 - 19] . http:∥arxiv. org / abs/ 1804. 02767. 
[10] REDMON J, FARHADI A. YOLO9000: better, faster, stronger[C]∥2017 IEEE Conference on Computer Vision and Pattern Recognition ( CVPR) . Piscataway: IEEE, 2017: 6517-6525. 
[11] WANG C Y, BOCHKOVSKIY A, LIAO H Y M. YOLOv7: trainable bag-of-freebies sets new state-of-theart for real-time object detectors [ C] ∥2023 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR) . Piscataway: IEEE, 2023: 7464-7475. 
[12] REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149. 
[13] DAI J F, LI Y, HE K M, et al. R-FCN: object detection via region-based fully convolutional networks [ EB / OL] . (2023- 12 - 11 ) [ 2024 - 08 - 19 ] . http:∥arxiv. org / abs/ 1605. 06409. 
[14] 阎馨, 杨月川, 屠乃威. 基于改进 SSD 的钢材表面缺 陷检测[ J] . 现代制造工程, 2023(5) : 112-120. 
YAN X, YANG Y C, TU N W. Steel surface defect detection based on improved SSD[ J] . Modern Manufacturing Engineering, 2023(5) : 112-120. 
[15] 院老虎, 常玉坤, 刘家夫. 基于改进 YOLOv5s 的雾天 场景 车 辆 检 测 方 法 [ J] . 郑 州 大 学 学 报 ( 工 学 版) , 2023, 44(3) : 35-41. 
YUAN L H, CHANG Y K, LIU J F. Vehicle detection method based on improved YOLOv5s in foggy scene[ J] . Journal of Zhengzhou University ( Engineering Science) , 2023, 44(3) : 35-41. 
[16] OUYANG D L, HE S, ZHANG G Z, et al. Efficient multi-scale attention module with cross-spatial learning [C]∥2023 IEEE International Conference on Acoustics, Speech and Signal Processing ( ICASSP ) . Piscataway: IEEE, 2023: 1-5.
[17] GEVORGYAN Z. SIoU loss: more powerful learning for bounding box regression [ EB / OL ] . ( 2022 - 05 - 25 ) [2024-08-19] . https:∥arxiv. org / abs/ 2205. 12740.

更新日期/Last Update: 2025-07-13