The existing detection algorithms are unable to achieve a suitable balance between detection accuracy and inference speed. As the accuracy of the algorithm increases, its complexity also rises, resulting in a decrease in detection speed, which undermines its practicality. This issue is particularly evident in the context of surface defect detection in industrial parts, where low contrast, small target features, difficult feature extraction, and low real-time detection efficiency are prominent challenges. This study proposes a novel method for steel defect detection based on the YOLO v8 algorithm, which improves detection accuracy while maintaining low computational complexity. Firstly, the global background and edge information are adaptively extracted via the MSA-SPPF module in order to obtain a more comprehensive feature representation. Furthermore, the anti-interference ability of the model is enhanced through the deformability of attention and the large convolution kernel characteristics. Secondly, the design of Dynamic Conv and C2f-OREPA enables the model to efficiently reduce the demand for computational resources while maintaining high performance. It is further proposed that the RepHead detection head approximates the multi-branch structure of the original training by a single convolution operation. This approach not only enriches the feature representation but also maintains an efficient inference process. The effectiveness of the improved MRP-YOLO algorithm is verified using the NEU-DET industrial surface defect dataset. The experimental results demonstrate that the mAP of the MRP-YOLO algorithm reaches 75.6%, which is 2.2% higher than that of the YOLOv8n algorithm, while the FLOPs are only 2.3 G higher. It indicates that the detection accuracy is significantly improved with a limited increase in computational complexity.
Read full abstract