Abstract:This paper proposes YOLOv5-CJ for steel surface defect detection. C3_MSBlock enhances multi-scale feature extraction and enlarges the receptive field, while DyHead introduces scale-, spatial-, and task-aware attention to improve robustness in complex scenes. Soft non-maximum suppression (NMS) further improves recognition in overlapping regions. Compared with YOLOv5s, YOLOv5-CJ improves the mean average precision at intersection over union (IoU) of 0.5 (mAP0.5) and the mean average precision averaged over IoU threshold from 0.5 to 0.95 (mAP0.5:0.95) by 1.9% and 7.2% on the Northeastern University steel surface defect (NEU-DET) dataset, and by 5.3% and 4.3% on the GC10 steel surface defect (GC10-DET) dataset, respectively, demonstrating its effectiveness for industrial defect detection.