The surface defect of strip steel seriously affects the product quality, the current identification methods have the inherent defects of low detection efficiency and poor detection accuracy, and it is important an improved an algorithm based on the modified YOLOv5 framework to enhance the defect detection effectiveness and accuracy. To create a more lightweight network model, the C3 module and part of the convolutional structure in the original YOLOv5 network were replaced with the GhostBottleneck structure. Additionally, the Coordinate Attention (CA) mechanism was incorporated into the Backbone section to compensate for the original model's lack of attention mechanisms. To address the angular mismatch between the actual frame and the predicted bounding box, a limitation overlooked by the CIOU loss function was further refined. Experimental results demonstrate that the enhanced YOLOv5s-CSG model outperformed the original YOLOv5s by 7.3 %, achieving a significant 37.9 % reduction in model size and an mAP value of 77.5 %. Furthermore, the detection precision and speed were notably higher compared to several widely-used algorithms. The proposed YOLOv5s-CSG model is well-suited for deployment on mobile devices and shows great potential for rapidly and accurately detecting both the type and location of strip surface defects, surpassing the performance of existing methods.