# Solder Joint Defect Detection in the Connectors Using Improved Faster-RCNN Algorithm
## 1 Introduction
Compared with the traditional target detection classification algorithm, the convolutional neural network does not need to design feature extraction algorithm manually. At present, mainstream target detection algorithms include Faster-RCNN [12], You Only Look Once (YOLO) [13], Single Shot MultiBox Detector (SSD) [14], etc. In the industrial field, many enterprises have begun to use deep convolutional neural network to replace traditional algorithms and complete a series of tasks such as production, planning and quality detection. As experts and scholars explored continuously, deep convolutional neural network has gradually shown its powerful functions and advantages [15; 16; 17; 18; 19; 20]. [PERSON] proposed an automatic coding system including an encoder and a decoder, and designed three full connection layers for feature extraction with the idea of deep learning [21]. The two feature matching strategies are designed for images with different backgrounds (smooth or texture). However, the threshold value of this method needs to be designed according to experience, and the size of the block needs to be changed under different defect targets and overall image proportion, otherwise the score will be affected. [PERSON] proposed an improved YOLO-v3 algorithm to complete defect detection of PCB electronic components [22]. The training data was expanded to 20 times by means of data combination and data enhancement. Because YOLO-v3 has a low recognition rate for small electronic components on PCB, the author adds a shallow layer on the basis of YOLO-v3, and uses the features obtained from the shallow layer to identify and detect the widgets. Finally, the mean average precision (mAP) was raised from 77.08 to 93.07%. [PERSON] took Faster-RCNN as the main algorithm to solve the detection task of 5 kinds of defects on the wood surface [23]. He cropped the collecting board images and enhanced them, then used the AlexNet, Visual Geometry Group-16 Network (VGG-16), ResNet, GoogleNet to achieve transfer learning. The accuracy of test results under different combinations (batch size, learning rate) of different networks is compared. The results show that the highest detection accuracy of 80.6% can be obtained by using ResNet for transfer learning. [PERSON] used the classical Faster-RCNN algorithm to identify the defect location and defect type of the tunnel wall, and then obtained a series of proposal boxes on the image. Then the marked image was sent into the adaptive border region of interest (ROI) boundary layer, and the minimum external rectangular box was selected for various marked boxes to remove the redundancy of data set and reduce the difficulty of interference identification in the process of data set creation. Finally, the three-layer full connection layer is used to complete the defect recognition task within a single marker frame of the adaptive boundary ROI boundary layer output. This algorithm reduced the error detection rate of defects in tunnels from an average of 0.3 to 0.019 [24]. Although the target detection algorithm based on deep learning has been widely used in the industry, there are few researches on solder joint defect detection of connectors. The reasons are as follows: (1) there are various kinds of solder joint defects and it is difficult to classify them; (2) The connector pin arrangement is complex, easy to block the solder joints, and difficult to obtain images; (3) The detection accuracy cannot meet the industrial requirements. Based on the above reasons and actual industrial requirements, this paper will adopt Faster-RCNN as the basic target detection algorithm to carry out appropriate algorithm improvement and finally improve the detection accuracy of five solder joint types (one qualified solder joint and four defective solder joints). The qualified connector solder joints shall be smooth and uniform between the cup and the core wire, the tin shall be filled with more than 75% of the cup and the length of core wire exposed outside the cup shall not exceed 1.5 times of the outer diameter of the cup.