SSC-YOLOv8n-Based Surface Defect Detection for Lathe Tools
Abstract
Reliable detection of subtle defects on highly reflective lathe-tool surfaces remains difficult because conventional downsampling loses high-frequency details and background reflections obscure weak defect responses. This paper proposes SSC-YOLOv8n, an improved YOLOv8n detector that integrates spatial-to-depth convolution and multiple attention mechanisms. Except for the first standard strided convolution, all downsampling layers in the backbone are replaced with SPDConv, which is also used at necessary downsampling positions in the neck to preserve spatial details from shallow to deep features. A parameter-free SimAM module then assigns three-dimensional attention weights across spatial and channel dimensions to emphasize statistically distinctive feature responses without adding trainable parameters. Finally, CoordAtt modules are introduced after multiscale fusion nodes in the neck and detection head and combined with C2f blocks to encode directional position information and improve defect representation across scales. On a lathe-tool defect dataset, SSC-YOLOv8n improves Precision, Recall, mAP@0.5, and mAP@0.5:0.95 by 1.22, 17.01, 7.40, and 4.98 percentage points, respectively, over baseline YOLOv8n. The resulting mAP@0.5 and mAP@0.5:0.95 are 92.57% and 57.78%. These results indicate that the proposed model improves the recall of subtle defects and localization stability across IoU thresholds while retaining practical model complexity.