一种改进的YOLOv5带钢表面缺陷检测算法研究

余龙飞, 刘业峰, 何增鹏, 马祎航

控制工程 ›› 2025, Vol. 32 ›› Issue (2) : 377-384.

控制工程 ›› 2025, Vol. 32 ›› Issue (2) : 377-384.

一种改进的YOLOv5带钢表面缺陷检测算法研究

作者信息 +

A Method for Improving YOLOv5 Strip Surface Defect Detection

Author information +
文章历史 +

摘要

YOLOv5模型存在特征信息提取不足、传递易丢失和表达能力弱等缺陷。结合NEU-DET数据集中带钢缺陷目标小、不规则以及图片质量差的特点,提出一种改进的YOLOv5带钢表面缺陷检测算法。采用第二版的可变形卷积网络(deformable convolution network version 2,DCNv2)代替YOLOv5中Neck部分的常规卷积,提高模型对不规则小目标的特征识别;将残差网络(residual network, ResNet)引入快速空间金字塔池化(spatial pyramid pooling fast, SPPF)结构形成SPPF_Res模块,替换原模块,且引入YOLOv5的Neck部分,改善模型在信息传递时的丢失问题;将空间注意力(spatial attention, SA)与协调注意力(coordinate attention, CA)并联为CAS注意力模块,使改进模块在关注不同通道关系的同时又能利用空间信息学习提升模型的特征表达能力。将改进模型在NEU-DET数据集上训练后,测得其检测精度为77.4%,较原YOLOv5模型提升7.4%,说明改进算法有效。

Abstract

Defects in the YOLOv5 model include inadequate feature information extraction, transmission loss, and poor expression capabilities. Based on the NEU-DET dataset’s features, which include tiny, uneven, and low-quality defect targets on steel surfaces, an improved YOLOv5 steel surface defect identification method is presented. Replace the conventional convolution in YOLOv5’s Neck with the deformable convolution network version 2 (DCNv2) to increase the model’s capacity to distinguish irregular tiny target characteristics. To improve the model’s information loss problem during information transmission, a residual network (Res) is proposed to be incorporated into the spatial pyramid pooling fast (SPPF) structure to form the SPPF_Res module, which will replace the original module and introduce the Neck part of YOLOv5. Improve information loss in the model. The spatial attention (SA) and coordinate attention (CA) are simultaneous in CAS attention modules, allowing the upgraded module to pay attention to diverse channel connections, and employ spatial information learning to improve the model’s feature representation capacity. After training the new model on the NEU-DET data set, the better model has a detection accuracy of 77.4%, which is 7.4% higher than the original YOLOv5 model, demonstrating that the enhanced approach is successful.

关键词

YOLOv5 / 缺陷检测 / CAS注意力机制 / SPPF_Res / DCNv2

Key words

YOLOv5 / defect detection / CAS attention mechanism / SPPF_Res / DCNv2

引用本文

导出引用
余龙飞, 刘业峰, 何增鹏, 马祎航. 一种改进的YOLOv5带钢表面缺陷检测算法研究[J]. 控制工程, 2025, 32(2): 377-384
YU Longfei, LIU Yefeng, HE Zengpeng, MA Yihang. A Method for Improving YOLOv5 Strip Surface Defect Detection[J]. Control Engineering of China, 2025, 32(2): 377-384

5

Accesses

0

Citation

Detail

段落导航
相关文章

/