| With the continuous development of automobile and other motor vehicle industry,the exhaust emission has accelerated the pollution of natural environment,which is against the existing policies of "energy saving and emission reduction" and "low carbon environmental protection".New energy vehicles have good prospects for green travel and subsequent development,the electronic water pump shell as a part of the cooling system of new energy vehicles has attracted much attention,but it is easy to have some surface defects in injection molding,high labor intensity in manual inspection,prone to errors,omissions and other problems,real-time automatic inspection of electronic water pump shell surface defects is one of the current solutions to the problem.In this thesis,the surface defect detection algorithm of electronic water pump shell is the main object of study,and the hardware design of the automatic detection system for surface defects of electronic water pump shell is carried out for its production process and space layout.In order to realize the real-time detection of surface defects of electronic water pump shell,the image acquisition equipment is built,the image data enhancement process is studied,the attention module is incorporated to improve the detection accuracy,the network structure is optimized to improve the detection speed,and the surface defect detection platform of electronic water pump shell is constructed and tested on this basis.The details of the study are as follows:Firstly,we studied the electronic water pump shell surface defect detection system,designed the surface defect detection equipment,analyzed the important factors affecting the detection algorithm,and determined the research architecture of the electronic water pump shell surface defect detection technology based on deep learning.Secondly,the electronic water pump shell surface defect acquisition equipment was built to obtain high quality surface defect images,data enhancement was performed in various ways,and image defect labeling and dataset production were completed.In order to improve the surface defect detection accuracy of the electronic water pump shell,different attention modules are incorporated into YOLOv5 s and the network structure is improved,and the dataset is trained,and the performance of the improved network structure is verified through experimental comparison of eight performance indexes,and YOLOv5s-SE is determined as the optimal network model.Thirdly,in order to improve the detection speed of surface defects of electronic water pump shell,a lightweight YOLOv5s-GCMN detection algorithm is proposed,using SE attention module combined with Mobile Net lightweight network and GSConv to solve the problem of information loss caused by depth separable convolution,and finally improving the loss function of YOLOv5 s to solve the target frame and prediction frame The position relationship problem of YOLOv5 s is solved.The experiments show that the YOLOv5 sGCMN detection algorithm outperforms other lightweight algorithms in terms of comprehensive performance of accuracy and speed on the electronic water pump shell dataset,and can complete real-time detection of surface defects on the electronic water pump shell,and proves the universality of the detection algorithm on the public dataset.Finally,in order to apply the YOLOv5s-GCMN detection algorithm in industrialization,the optimal training model is obtained through Tensorrt accelerated inference and the detection function is encapsulated into a DLL dynamic link library for Lab VIEW calls,and a Lab VIEW-based surface defect detection platform for electronic water pump shell is constructed.The test shows that YOLOv5s-GCMN detection algorithm can achieve highprecision real-time detection of surface defects of electronic water pump shell on the detection platform. |