A Steel Surface Defect Detection Model Based on the Improved YOLOv8n
Due to the small size of the surface defects on steel and their high overlap with the back-ground,traditional defect detection algorithms face issues of missing and wrongly detecting these defects.First,the C2f-OConv module was constructed using full-dimensional dynamic convolution(ODConv).This module was designed to extract defect features from multiple dimensions,enhanced the network's global feature extraction capabilities.A loss function based on Normalized Wasserstein Distance(NWD)was introduced.This function aimed to boost the positioning accuracy of the network for steel surface de-fects.Additionally,by reducing the number of convolution operations in the network head,a new detec-tion head called Light-Detect was proposed,it decreased the model's resource occupancy and improved the model's real-time detection capabilities.The CBAM attention mechanism was added after SPPF to enhance feature coupling across different layers.Experimental results demonstrated that the mAP(mean average precision)value of the YOLOv8n-Eff algorithm was obtained.It reached 78.6%on the NEU-DET steel surface defect dataset.This represented a 3.2%increase in mAP compared to the original YOLOv8n algorithm.The computational cost was reduced by 2.4 G,and the AP value for crack target defects improved by 10.8%.The results confirmed that the YOLOv8n-Eff algorithm improved average de-tection accuracy for target defects on steel surfaces,reduced the missed detection rate,and lowered the model's computational costs,effectively meeting the requirements for steel surface defect detection.
steel surface defect detectionYOLOv8nattention mechanismsmall target detectiondy-namic convolutionloss function