摘要
针对带钢表面缺陷小目标检测精度低以及检测效率低等问题,提出了一种基于YOLOv5s的带钢表面缺陷检测算法。首先,增加一个大尺度预测层,通过更丰富的位置信息提高小目标缺陷的检测效果,减少漏检和误检的问题;其次,将Shuffle Netv2轻量化骨干网络替换原来的CSPDarknet53网络结构,降低模型参数数量,加快模型推理速度;然后,在特征提取网络末端添加基于Transformer编码的C3TR模块以及在特征融合网络中添加CA注意力机制,增强网络对缺陷的特征提取能力;最后,引入WIoU损失函数来取代GIoU,提高回归精度。实验结果表明,改进后的YOLOv5s算法在武汉某钢厂采集的带钢表面缺陷数据集上平均准确率(mAP)达到92.2%,较原始YOLOv5s提高了4.7%,检测速度FPS达到了82,具有较高检测精度。并引入公开数据集进行泛化实验,结果均有显著提升,进一步满足了对带钢表面缺陷检测的需求。
Aiming at the issues of low accuracy and efficiency in detecting small target defects on the surface of steel strips,a novel steel strip surface defect detection algorithm based on YOLOv5s is proposed.Firstly,a large-scale prediction layer is added to enhance the detection performance of small target defects by providing richer positional information and reducing the problems of missed detection and false alarms.Secondly,the lightweight ShuffleNetv2 backbone network is employed to replace the original CSPDarknet53 network structure,reducing the number of model parameters and accelerating the inference speed.Furthermore,the C3TR module based on Transformer encoding and the CA attention mechanism are added to the feature fusion network at the end of the feature extraction network to enhance the feature extraction capability for defect detection.Lastly,the WIoU loss function is introduced to replace the GIoU loss,improving the regression accuracy.The experimental results show that the average accuracy(mAP)of the improved YOLOv5s algorithm on the strip surface defect dataset collected by a steel mill in Wuhan reaches 92.2%,which is 4.7%higher than that of the original YOLOv5s,and the detection speed and FPS reach 82,which has high detection accuracy.In addition,the public dataset was introduced for generalization experiments,and the results were significantly improved,which further met the demand for strip surface defect detection.
作者
王林琳
龚昭昭
梁泽启
WANG Linlin;GONG Zhaozhao;LIANG Zeqi(School of Mechanical Engineering,Hubei University of Technology,Wuhan 430068,China)
出处
《组合机床与自动化加工技术》
北大核心
2024年第12期181-186,共6页
Modular Machine Tool & Automatic Manufacturing Technique
基金
湖北工业大学博士科研启动基金项目(BSQD2019010)。