# Application Research of Improved YOLO V3 Algorithm in PCB Electronic Component Detection
## 4 Experiments and Analysis
### The Experimental Results
#### 4.3.1 Analysis of Subjective Test Results  
The above four algorithms can realize multi-object detection in one image and we tested 200 images with them. The detection object is matched in different bounding boxes and some detection results are expressed as follows (Figures 10-12). The four subfigures a-d of Figures 10-12 represent the detection effects of the above four algorithm experiments. For the sake of simplicity, we use algorithms in subfigures a-d of Figures 10-12 to represent YOLO V3 + COCO dataset 9 anchors, YOLO V3 + PCB dataset 9 anchors, YOLO V3 + PCB dataset 9 anchors, YOLO V3 + PCB dataset 9 anchors 800 boarding boxes, and YOLO V3 + 4 outputs PCB dataset 12 anchors 800 boarding boxes from Figures 10-12. The algorithm in every subfigure d of Figures 10-12 is our final improved YOLO V3 method for detecting PCB electronic components. Here we use yellow lines to mark the difference between the four algorithms. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithm** & **Parameter** & **Value** \\ \hline \multicolumn{3}{c}{Train image size in pixels (height} & \(416\times 416\) \\  & \(\times\) width) & 29 \\ \multicolumn{3}{c}{Number of categories} \\ All four convolutional networks & Training steps & 70,000 \\ follow & Learn\_rate\_init & 0.0001 \\  & Learn\_rate\_end & 0.000001 \\  & Weight decay & 0.0005 \\  & Gradient Descent & Adam Optimizer \\  & Train mode & GPU (Graphics Processing Unit) \\ \hline \multicolumn{3}{c}{Self\_max\_bbox\_per\_scale} & 120 \\ YOLO V3 + COCO dataset 9 anchors & Anchors & \((10\times 13)\); \((16\times 30)\); \((33\times 23)\); \((30\times 61)\); \((62\times 45)\); \((59\times 119)\); \((116\times 90)\); \((156\times 198)\); \((373\times 326)\) \\  & Outputs & 3 \\ \hline \multicolumn{3}{c}{Self\_max\_bbox\_per\_scale} & 120 \\ YOLO V3 + PCB dataset 9 anchors & Anchors & \((13\times 31)\); \((21\times 42)\); \((31\times 15)\); \((34\times 58)\); \((51\times 29)\); \((57\times 98)\); \((78\times 48)\); \((150\times 118)\); \((255\times 323)\) \\  & Outputs & 3 \\ \hline \multicolumn{3}{c}{Self\_max\_bbox\_per\_scale} & 800 \\ YOLO V3 + PCB dataset 9 anchors & Anchors & \((13\times 31)\); \((21\times 42)\); \((31\times 15)\); \((34\times 58)\); \((51\times 29)\); \((57\times 98)\); \((78\times 48)\); \((150\times 118)\); \((255\times 323)\) \\  & Outputs & 3 \\ \hline \multicolumn{3}{c}{Self\_max\_bbox\_per\_scale} & 800 \\ YOLO V3 + 4 outputs PCB dataset & & \((13\times 24)\); \((14\times 34)\); \((19\times 10)\); \((24\times 14)\); \((28\times 12)\) anchors 800 boarding boxes & Anchors & 54); \((33\times 15)\); \((35\times 33)\); \((47\times 23)\); \((54\times 87)\); \((69\times 45)\); \((146\times 118)\); \((255\times 323)\) \\  & Outputs & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Experimental execution parameters. Figure 11: Comparisons of object detection results on virtual image between the four algorithms. Figure 10: Comparisons of small object detection results between the four algorithms. Figure 10 highlights the effects of the four algorithms on detecting small objects. Small objects on the PCB mainly refer to electronic components such as resistors, capacitors and LEDs that are small in size. Therefore, we focus on the identification of three rows of resistors and capacitors in the lower middle of the picture. From Figure 10a we can observe that there are obvious detection errors in either the resistor or the capacitor. We can see that most of the detected bounding boxes size have changed, but it does not significantly improve the accuracy of the target detection in Figure 10b. The algorithm in Figure 10c considers the number of electronic components to be detected on each PCB picture based on the algorithm in Figure 10b. It is necessary to detect up to 800 targets per picture in the detection algorithm. Therefore, we can see that the detection accuracy of the resistance has been improved in Figure 10c.