| With the vigorous development of electronic products in China,the electronic assembly industry is entering a stage of rapid development,and China has become one of the main production bases of the world’s electronics manufacturing industry.However,the current electronic assembly industry generally uses welding quality inspection equipment that requires manual assistance to detect whether the welding quality of the Printed Circuit Board(PCB)is qualified,especially for welding quality inspection of non-standard electronic components,which requires manual visual inspection to determine whether there are solder joint defects.This traditional welding quality inspection method is inefficient,costly,and subjective.Therefore,the realization of fully automatic inspection of PCB solder joint defects is of great significance to realize the leapfrog development of China’s electronic assembly industry to intelligent manufacturing.This thesis focuses on the application demand of automating welding quality inspection of non-standard electronic components on PCB,and conducts research on object detection of solder joint and classification of solder joint defect based on deep learning,and deployment of models.The main work of this thesis is as follows.(1)A welding image database of non-standard electronic components is constructed as the data support for subsequent research.The welding image database is constructed by creating a solder joint target data set and a solder joint defect data set through processes such as image acquisition,data pre-processing,and data annotation.Among then,the solder joint target data set will be used to detect the position of solder joints on PCB,while the solder joint defect data set will support the classification of solder joints.(2)A solder joint object detection algorithm based on improved YOLOv5 is proposed.A small object detection algorithm based on improved YOLOv5 is proposed for the case of small target scales such as solder joints.The algorithm uses a hybrid domain attention mechanism to focus on the position information of the target in the input image,so that the network model learns to focus on the key information.At the same time,the position of the receptive field is enhanced to support small object detection by adding additional offset and spatial sampling position of sampling weight.(3)A solder joint defect classification algorithm based on attention mechanism is proposed.A solder joint defect classification algorithm is proposed by improving Res Net50 for problems such as small granularity of difference between defect images of various solder joint types and easy confusion.A dual-branch attention structure is constructed to make the network model have stronger fine-grained feature learning ability,and the HSwish activation function is introduced to replace Re LU to finally achieve high precision fine-grained classification of solder joint defects.(4)The two algorithm models mentioned above are deployed and a welding quality inspection system is built.First,the models are deployed by using the Flask framework.Secondly,the system is built to visualize the inspection results of the algorithms and to save the data generated in the production environment in real time for subsequent continuous optimization of the algorithms.Finally,the actual feasibility of the models and the system is verified in the real-world industrial production environment. |