| In recent years,China’s iron and steel output has become higher and higher,but there is still a certain gap with the product quality of developed countries.Due to the complex environment of industrial site,the traditional target detection method has low accuracy and slow speed for defect detection,which cannot meet the needs of industrial site perfectly.In this context,the research of steel surface defect detection based on depth learning is of great practical significance.In this paper,aiming at the improvement of YOLOv5 algorithm,steel commonly used in industrial production is selected as the research object,and a series of studies are made on its surface defect detection.The main work is as follows:1.Aiming at the problems of low detection accuracy of small target objects and incomplete feature information extraction in the current research on steel surface defect detection,the backbone network is improved and integrated with the Swin Transformer structure,and then CBAM and CA attention mechanism modules are added at the detection head.Through the analysis of several groups of comparative experiments,it can be concluded that the detection performance of the model can be improved by improving the backbone network or part of the network at the detection head alone.2.In view of the problem that there are few data sets on the steel surface,the number of samples available for training is increased and the distribution of defects is enriched by preprocessing the data with Mosaic data enhancement method.In addition,the improved K-Means clustering method is used to re divide the initial Anchor value to solve the problems of large defect location deviation and inaccurate target box positioning.Compared with the experimental results,the improved model improves the accuracy of defect location and reduces the rate of false detection and missed detection.The m AP value of the improved network model is 7.3% higher than that of the original network model.3.In view of the real-time detection requirements in the industrial field,the depth separable convolution and Ghost Bottleneck are used to lightweight the improved network model.And compared with the mainstream single-stage target detection algorithm,it can be proved that the lightweight model can greatly improve the detection speed when the loss of accuracy is not large,and can detect the steel surface defects in a complex industrial environment in real time. |