. In order to improve the detection quality of strip steel surface defects and ensure the productivity and cost control of industrial production lines, this paper proposes a model based on the You Only Look Once version 7 (YOLOv7) for strip steel surface defect detection. The model is divided into two parts: firstly, the Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm is used to enhance the image contrast and suppress the noise; secondly, the YOLOv7 is optimized by introducing the weighted Bi-directional Feature Pyramid Network (BiFPN) and the bilinear interpolation to preserve the image details, embedding the Squeeze-and-Excitation (SE) attention mechanism and constructing the MP-SE module to improve the feature extraction and fusion ability, introducing the Small Proposal Detection Convolution (SPD Conv) module at the output to enhance the detection ability of small target defects, and finally constructing the new network structure YLSE. The experimental results show that the model on the NEU-DET data set has an mAP value of 80.7% and an F1 factor of 76%, which are 3.6% and 7% higher than that of the original YOLOv7 model, which verifies that the present model plays a good role in improving feature extraction, feature fusion, and optimizing the detection ability of small targets.