| The tee pipe is an important component in the water pipeline system.In the production process of the tee pipe,various surface defects will occur,so efficient automatic surface defect detection is of great significance.With the continuous development of convolutional neural networks,target detection algorithms based on deep learning have been widely used in the field of surface defects,but target detection algorithms based on deep learning usually have large-scale network parameters and complex network structures,which cause the problems of slow detection speed and high requirements for deploying equipment in the actual production of enterprises.In view of the above problems,the improvement work of this thesis is as follows:In YOLOv5 s,the Ghost module is used to replace the original convolution operation,and for the characteristics of small-scale targets in the surface defect detection dataset of tee pipe,and the difference between different target scales is small,the redundant part of the multi-scale feature fusion structure is removed.The number of prediction branches is reduced,which greatly reduces the amount of parameters of the network.Experiments show that,compared with the original YOLOv5 s algorithm,the detection time of the above lightweight and improved YOLOv5 s algorithm on CPU devices is 106.1 milliseconds,a reduction of 142.1 milliseconds;m AP is 94.3%,an increase of 1%;the model size is 3.7 MB,which is 26.6% of the original volume.On the premise of ensuring the detection accuracy,the network structure is lightened.In addition,in view of the problem that the Mosaic data augmentation on YOLOv5 introduces invalid information and the proportion of positive samples during training is low,the mosaic scheme of Mosaic data augmentation is improved.Experiments show that compared with the original Mosaic data augmentation,the number of epochs required for the YOLOv5 s network with improved Mosaic data augmentation to converge on this dataset is 314,which reduces 86 epochs.The improved Mosaic data augmentation effectively improves the efficiency of model training. |