An Improved YOLOv8n Algorithm for Steel Surface Defect Detection - Ma, Dongmei; Zhang, Na; Lv, Xuelong (International Journal of Computer Science and Information Technology, 2024)
Due to the manufacturing process and other aspects, steel surface defects vary in shape and size, which is a difficult point for defect detection. For this reason, this paper proposes a steel surface defect detection algorithm based on YOLOv8n. The algorithm improves the C2f module of Backbone in this network by adding Context Guided Block (CG block), which can effectively extract the local features, surrounding context and global context, and integrate this information to improve the precision and accuracy of detection. Meanwhile, we also change the detection header of YOLOv8 to Detect_ASFF by introducing the Adaptive Spatial Feature Fusion (ASFF) technique. This improvement effectively filters out the conflicting information, which can allow the model to have a better adaptability at different scales. In this paper, Shape-IoU is adopted as the bounding box loss function to make up for the traditional IoU loss that ignores the intrinsic properties of the bounding box in the calculation process. After optimisation, mAP@0.5 are improved to 67.9% and mAP@0.5~0.95 are improved to 35.1%, which is 2.8% and 1.1% respectively. The improved algorithm in this paper has improved in detection accuracy, which proves the practicality and effectiveness of the algorithm in this paper.