Abstract:Aiming at the problems of low detection efficiency and difficult positioning of traditional steel surface defect detection methods, a lightweight steel surface defect detection model based on you only look once version 7 (YOLOv7) is proposed. First, a cascading style sheets (CSS) block module is proposed, which uses more lightweight operations to obtain redundant information in the feature map, reduces the amount of computation, and effectively improves the detection speed. Secondly, the improved spatial pyramid pooling with cross stage partial convolutions (SPPCSPC) structure is adopted to ensure that the model can also pay attention to the defect location information while predicting the defect category information, obtain richer defect features. In addition, the convolution operation in the original model is simplified, which significantly reduces the size of the model and helps to improve the detection speed. Finally, using efficient intersection over union (EIOU) loss to focus on high-quality anchors, speed up convergence and improve positioning accuracy. Experiments were carried out on the Northeastern University-defect (NEU-DET) steel surface defect dataset. Compared with the original YOLOv7 model, the number of parameters of this model was reduced by 40%, the frames per second (FPS) reached 112, and the average accuracy reached 79.1%, the detection accuracy and speed have been improved, which can meet the needs of steel surface defect detection.