Feature Enhancement and Metric Optimization for Defect Detection on Steel Surface
To address the challenges of low detection accuracy,frequent missed detections,and false detections in steel surface defect detection for small target samples,an improved YOLOv7 algorithm is proposed.First,the Swin-Transformer is introduced for feature extraction,and a dual-branch loop is employed to fuse global and local features interactively.Second,distribution shift convolution is utilized to improve the efficient layer aggregation network,thereby enhance its local feature extraction capability.Finally,the regression loss function incorporates the weighted normalized Wasserstein distance and complete intersection over union methods to reduce the sensitivity to small target deviations.Experimental comparisons on the NEU-DET dataset demonstrate that the improved algorithm increases the mean average precision by 8.8 percentage points,reaching 83.1%.Proposed algorithm improves the accuracy of steel surface defect detection and reduces false detections and missed detections for small target samples.In addition,the proposedd algorithm achieves a detection speed of 71 frames/s,meeting the requirements for real-time detection.