MSD-YOLO: A Multi-Scale Collaborative Efficient Detector for Complex Metal Surface Defects
Abstract
Metal surface defects are characterized by large scale variations, irregular shapes, low contrast, and strong interference from textured backgrounds, requiring lightweight detectors to balance fine-grained information preservation and real-time deployment. To address this challenge, this paper proposes MSD-YOLO (Multi-Scale Defect-aware YOLO) based on YOLOv8n. LSCD is introduced at the first downsampling stage to preserve shallow edge and texture information. C2f-DRWA is constructed to adaptively aggregate multi-scale context through dual-dilation depthwise convolution branches and Softmax-based competitive weighting. AFFM replaces selected concatenation operations to achieve content-aware cross-level feature fusion, and DSAHead is designed to strengthen scale calibration and texture representation for classification. On the NEU-DET validation set, MSD-YOLO achieves 77.6% mAP@0.5 and 42.8% mAP@0.5:0.95, exceeding YOLOv8n by 3.3 and 2.6 percentage points, respectively. On the independent test set, the corresponding results are 78.7% and 45.9%, with gains of 0.6 and 1.5 percentage points. The reported parameter count remains 3.0 M, while the computational cost decreases from 8.2 to 7.6 GFLOPs. On the NEU-DET validation set, COCO-style size-stratified evaluation shows improvements of 3.8, 2.9, and 3.9 percentage points in APS, APM, and APL, respectively, over YOLOv8n. On GC10-DET, Severstal, and the AL10-DET experimental subset, mAP@0.5 improves over the baseline by 2.4, 10.6, and 5.1 percentage points, respectively. Tests on Jetson Orin Nano show a pure TensorRT inference speed of 384.6 FPS and an end-to-end CSI-camera detection speed of 58.5 FPS. The results demonstrate that the proposed multi-scale collaborative design improves defect detection across different object sizes while maintaining a favorable balance among detection accuracy, model complexity, and real-time performance on edge devices.