| Automatic assembly technology of electronic components is the key to automation in the electronics industry.In the process of sorting or assembling electronic devices,it is necessary to be able to quickly and accurately classify and obtain location information for electronic components.In recent years,object detection techniques based on deep learning have achieved good results and have been widely used in a variety of different industrial scenarios.However,there are still many problems such as small size of electronic components,difficulty in classification,and weak generalization ability of detection algorithms with large number of parameters.In this thesis,an improved target detection algorithm based on Yolov5s is proposed for electronic components in the pipeline in terms of accuracy of computation,rate of computation,and the number of parameters and floating point operations of the model.The main research contents are as follows:(1)To complete the dataset production,we first selected 11 kinds of commonly used electronic components,such as resistors and inductors,and completed the electronic component image acquisition part with cell phones,then cropped the images through Adobe Photoshop,and finally expanded the dataset and Labelmg labeling through Python to establish a dataset of electronic components containing 5962 images.(2)We propose an improved target detection algorithm based on Yolov5s for electronic components by comparing the performance aspects of currently popular target detection algorithms.A deep learning model is built to train the electronic components with prediction and the training results are analyzed.In addition,three currently common target detection models,Yolov3,Yolov4,and Yolov7,are compared with Yolov5 for performance.To improve the accuracy of the models,four attention mechanisms,namely SE,CBAM,CA,and ECANet,are fused into the C3 module in Yolov5s backbone network Backbone,and finally Precision,Recall,and FPS performance evaluations are performed.(3)In order to further lighten the model of Yolov5s and to maintain high accuracy while reducing the number of model parameters,a lightened and improved electronic component target detection algorithm based on Yolov5s is proposed.In order to reduce the number of model parameters and floating point operations while maintaining high accuracy,we propose an improved algorithm based on Yolov5s lightweighting for electronic component target detection,using the MobileNetV3 module in Backbone,replacing the SE attention mechanism in this model with the NAM attention mechanism,and replacing the CARAFE upsampling operator in Neck with the nearest neighbor interpolation upsampling algorithm. |