# Solder Joint Defect Detection in the Connectors Using Improved Faster-RCNN Algorithm
## 3 Results  
In this paper, we chose the open-source version of TensorFlow Faster-RCNN on GitHub as the basic algorithm framework. In terms of hardware, Inter Core I7-8750h CPU and Nvidia GTX 1050 Ti 8G GPU were used to achieve efficient operation rate. As for the data, 625 solder joint images were collected, including five types, namely qualified, multi-tin, less-tin, connected welding, and tin tip. A total of 100 images were randomly selected as the test images, and the remaining 525 images were expanded through the data augmentation and made into the training set, verification set and test set. In terms of network model parameters, the maximum steps of training were 30000, the batch-size was selected as 256, and the learning rate was selected as 0.001. In the experiment, we first used the initial training set to train the original version of Faster-RCNN, and proposed three improvement strategies by analyzing the results. Subsequently, we used the enhanced data set for comparison experiments to verify the  
Figure 8: Two kinds of residual unit. (**a**) 2-layers residual unit; (**b**) 3-layers residual unit. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Layer Name** &
\begin{tabular}{c} **Output** \\ **Size** \\ \end{tabular} & **18-Layer** & **34-Layer** & **50-Layer** & **101-Layer** & **152-Layer** \\ \hline conv1 & \(112\times 112\) & & & & \(7\times 7,64\), stride 2 \\ \hline conv2\_x & \(56\times 56\) & & & \(3\times 3\) max pool, stride 2 \\ \hline conv3\_x & \(28\times 28\) & \(\left[\begin{array}{c}3\times 3,\,128\\ 3\times 3,\,128\end{array}\right]\times 2\) & \(\left[\begin{array}{c}3\times 3,\,64\\ 3\times 3,\,64\end{array}\right]\times 2\) & \(\left[\begin{array}{c}1\times 1,\,128\\ 3\times 3,\,128\end{array}\right]\times 4\) & \(\left[\begin{array}{c}1\times 1,\,256\\ 3\times 1,\,128\\ 1\times 1,\,512\end{array}\right]\times 4\) & \(\left[\begin{array}{c}1\times 1,\,256\\ 3\times 1,\,128\\ 1\times 1,\,512\end{array}\right]\times 4\) & \(\left[\begin{array}{c}1\times 1,\,256\\ 3\times 1,\,128\\ 1\times 1,\,512\end{array}\right]\times 4\) & \(\left[\begin{array}{c}1\times 1,\,256\\ 3\times 1,\,256\\ 1\times 1,\,1024\end{array}\right]\times 3\) \\ \hline conv5\_x & \(7\times 7\) & \(\left[\begin{array}{c}3\times 3,\,512\\ 3\times 3,\,512\end{array}\right]\times 2\) & \(\left[\begin{array}{c}3\times 3,\,512\\ 3\times 3,\,512\end{array}\right]\times 3\) & \(\left[\begin{array}{c}1\times 1,\,512\\ 3\times 3,\,512\end{array}\right]\times 3\) & \(\left[\begin{array}{c}1\times 1,\,512\\ 3\times 3,\,512\\ 1\times 1,\,2048\end{array}\right]\times 3\) \\ \hline \multicolumn{5}{c}{average pool, 1000-d fc, softmax} \\ \hline FLOPs & \(1.8\times 10^{9}\) & \(3.6\times 10^{9}\) & \(3.8\times 10^{9}\) & \(7.6\times 10^{9}\) & \(11.3\times 10^{9}\) \\ \hline Top-1 error & \(27.88\%\) & \(25.03\%\) & \(22.85\%\) & \(21.75\%\) & \(21.43\%\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: ResNet-N network structure and accuracy. effectiveness of k-mean clustering, and used ResNet-101 to generate anchor boxes and transfer learning, respectively. Finally, we fused all the improved algorithms and completed the task of connector solder joint defect detection. By comparing and analyzing the experimental results, it is proved that the algorithm proposed in this paper is efficient and feasible for the detection of connector solder joint defects. In the original version of Faster-RCNN, 9 fixed anchor boxes were selected, which were obtained through the comprehensive analysis of the target scale of Pascal VOC data set. Although the anchor boxes generated can contain most of the areas of the solder joint defect target in this paper, the offset coefficient in the regression algorithm is too large compared to the boxes with closer scales, resulting in the inaccurate position of the calculated proposals. This problem is particularly evident at the beginning of training, as shown in Figure 9a. The proposal loss obtained after using k-means clustering to generate anchor boxes algorithm is shown in Figure 9b.