Traditional steel surface defect detection methods have issues such as low detection accuracy and efficiency. It is suggested a technique based on enhanced YOLOv5 steel surface fault identification. In order to improve the network's capacity to handle feature information, this study suggests adding SE attention mechanisms to the YOLOv5s network's Backbone, Neck, and SPPF and replacing the C3 structure at the end of the Backbone with C3TR. To achieve network model lightweight, it is proposed to replace the Neck part in the YOLOv5s model and the convolution in SPPF with Ghost convolution. Then, to improve network feature fusion, extend the improved SPPF to the Neck part. Introduce the SPD convolution in the Backbone section to reduce the information loss caused by the neural network's convolution. The tested mAP is 75.3%, which is 5.3% higher than the original model, 24.6% higher than the SSD method, and 4.6% higher than the YOLOv6 algorithm after the upgraded model has been trained on the NEU-DET dataset. The observed FPS is 81.3, which is 6.3 more than the relative literature algorithm and 18.0 more than the SSD algorithm.