Steel products play an important role in industry. However, the defects of strip surface affect industrial production and even cause significant economic losses. Therefore, it is a hot topic to accurately detect the steel surface defects. The deep learning is proven to be a useful tool for many fields. In this paper, an improved YOLOv5 network is applied to the strip surface defect detection. In this method, the preprocessing of defect images is conducted by the homomorphic filtering. Then, the convolutional block attention module is added into the YOLOv5 network to release more attention on important information related with the detection task and improve the detection accuracy. The datasets from the open source, NEU-DET of Northeastern University, are used to verify the performance of this network. The experimental results indicate that the YOLOv5 network with above two strategies has better detection capability and higher accuracy, which is suitable for real applications.