In order to solve the problem of low accuracy and high missed detection rate of existing algo-rithms caused by small scale,complex shape and fuzzy structure targets in steel defect detection tasks,the SDD-YOLO algorithm based on YOLOv5s is proposed.SDD-YOLO uses a two-layer routing Transformer to combine local features with global features to improve the detection of structurally ambiguous defects;a new CSDA attention is designed to enhance the information interaction capabilities of space and channels;NMS algorithm is improved by using NWD distance,to improve the detection accuracy of small-scale tar-gets;a new feature extraction structure is designed to reduce the loss of gradient information.Experiments using the enhanced NEU-DET data set show that the recall rate of the SDD-YOLO algorithm has increased by 6.22%compared with YOLOv5s,and the average precision has increased by 5.38%,it improves the detection ability of a variety of defects and can meet the needs of real-time detection.