Abstract
Steel surface defect detection is susceptible to small target sizes, low contrast, and class imbalance. To this end, we propose the Gradient-Reweighting with Awareness of Confidence and Lightweight Feature Enhancement (GRACE) algorithm built upon YOLO11s, composed of two synergistic modules: Dynamic Sampling with Confidence-Gradient Balanced Sampling Mechanism (DS-CBSM++) performs dynamic reweighting via joint confidence-gradient feedback, improving the separability of hard examples and long-tailed classes; Lightweight Feature Enhancement Network (Lite-FEN) introduces lightweight channel/spatial enhancement at the P3 layer to strengthen shallow textures and boundary cues while keeping computation low. Experiments on the NEU-DET dataset show that the baseline YOLO11s achieves an mAP@0.5:0.95 of 42.66% and an mAP@0.5 of 74.69%. GRACE achieves 43.66% and 75.88%, respectively, improving over the baseline by 1.00 percentage points and 1.19 percentage points, with 9.56 M parameters, suitable for real-time inference. These results indicate that GRACE yields more robust detection and localization of small defects under complex textured backgrounds.Additional experiments on the GC10-DET and X-SDD datasets further confirm that GRACE maintains competitive performance across different steel surface defect distributions.