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 struc-ture,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 algo-rithm 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 detec-tion 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.
steel surface defectsYOLOv5sShuffle Netv2C3TR moduleCA attention mechanismWIoU loss function
王林琳、龚昭昭、梁泽启
展开 >
湖北工业大学机械工程学院,武汉 430068
钢材表面缺陷 YOLOv5 s Shuffle Netv2 C3 TR模块 CA注意力机制 WIoU损失函数