| With the wide use of PE tube in industrial production and life,the quality of PE tube has attracted much attention.Surface defects of PE tubes will directly affect the quality of PE tubes.Manufacturers currently use manual visual detection method,which is not only labor-intensive and inefficient,but also easy to lead to surface defects omission and false detection.Therefore,according to the actual production requirements,in order to realize the automation of PE tube surface defect detection and greatly improve the accuracy and efficiency of defect detection,this paper optimized the online detection algorithm of PE tube surface defect image by designing the online acquisition experimental system of PE tube surface defect image combined with the deep learning target detection algorithm.This paper studies an image detection technology that can accurately and quickly identify the common types and locations of surface defects of PE tubes.The main research contents are as follows:(1)The production process of PE tube was summarized,three common defects of PE tube surface,scratches,stains and pits,and their characteristics were analyzed and studied.The structure of the image acquisition system and the position of the lighting source were designed,and the light source and camera were selected to ensure that the PE tube surface defect sample images could be collected quickly and comprehensively.(2)The pretreatment method of the original image is studied,and the image noise analysis and image filtering are carried out on the PE tube surface defect image.At the same time,in view of the small number and small sample problems existing in the study of PE tube surface defect images,a method of generating virtual sample of PE tube surface defect based on DCGAN algorithm was proposed to generate new defect samples and expand the defect image data set,effectively solving the problems of image blur and insufficient number of samples caused by noise.The experimental data set of surface defect image is established to provide experimental support for algorithm research.(3)The detection method of PE tube surface defect image based on YOLOv5 and YOLOv7 networks is studied,and the characteristics of detection targets are improved and optimized to meet the requirements of online detection.The YOLOv5 backbone feature network was replaced by lightweight network Mobile Net V2 to improve the detection rate.At the same time,in order to further improve the detection accuracy,the attention mechanism module is added to the feature extraction network.In order to emphasize defect features,YOLOv7 algorithm introduces an attention mechanism module into the feature extraction network,so that the network can better notice the defect features that need to be detected in this paper.The above research and comparative experiments show that the method studied in this paper can greatly improve the accuracy and efficiency of the surface defect image detection of PE tubes,and has the feasibility of engineering application,which lays a good research foundation for the development of the subsequent practical system. |