# Keypoint-Based Automated Component Placement Inspection for Printed Circuit Boards
## 3 Experimental Results
### Numerical Results and Comparisons
In particular, for the class of screws, when the recall value reaches 0.916, the precision value is 0.973. Therefore, the proposed algorithm is able to achieve high detection accuracy without triggering a large number of false alarms. Figure 11 shows examples of the inspection results for the capacitors for different PCBs. Accurate locations and sizes of the capacitors can still be acquired, even for the images from the testing set. To further demonstrate the effectiveness of the proposed algorithm, Figure 12 reveals examples for the joint inspection for screws, capacitors, mounting holes, three-pin chips, and eight-pin chips. It can be observed from the figure that joint inspection of five components can also be effectively carried out. In fact, the sizes of some of the components, such as three-pin chips, are very small, which may make it difficult to identify the components, even by direct visual inspection. The proposed algorithm is able to provide accurate inspection for small components on complex backgrounds. These examples reveal that the proposed algorithm is effective in improving PCB inspection quality for automatic manufacturing in smart factories. Figure 11: Examples of the inspection results for the capacitors for different PCBs. Figure 10: Precision–recall curves of the five component classes considered in this study. The corresponding network model is Model 3 with a two-stage training process. (**a**) Screw, (**b**) capacitor, (**c**) mounting hole, (**d**) three-pin chip, (**e**) eight-pin chip. In Table 6, comparisons of the proposed algorithm with existing works such as the faster region-based convolutional neural network (Faster RCNN) [19], DEtection TRansformer (DETR) [24], single-shot detection with MobileNet (SSD+MobileNet) [33], and you only look once (YOLO) v5 [34] are made to verify inspection quality. Furthermore, because it is desired to deploy the NN models in embedded platforms with limited computation capacity and/ or storage size, the computation speed and model size required for inference are important concerns for the corresponding applications. Therefore, as shown in Table 7, we also consider comparisons of the inference latency and model sizes among these algorithms in this study. The inference latency is measured on a personal computer (PC) and an embedded platform. The PC is equipped with an Intel Core I9-9900K CPU and nVidia GeForce RTX3080 Ti GPU. The embedded platform is Jetson Nano with ARM Cortex A57 CPU and nVidia Maxwell GPU. We can see from Tables 6 and 7 that the proposed algorithm outperforms many of the existing algorithms in the inspection of components. In fact, the proposed algorithm has a higher AP value and F1 score as compared with those of Faster-RCNN [19], SSD+MobileNet [33], and YOLO v5 [34] for the detection of all components. The proposed algorithm also has AP values and F1 scores comparable to those of DETR [24]. In addition, the proposed algorithm has a significantly lower inference time for PC-based inference. In particular, the inference time of the proposed algorithm and DETR are 21.4 ms and 206.5 ms for PC, respectively. The throughput (in frames per second, FPS) of the proposed algorithm and DETR are 46.73 and 4.84, respectively. The proposed algorithm has a faster computation speed because it has a smaller network size as compared with its DETR counterpart. In addition, it would be difficult to deploy DETR in low-cost edge devices such as Jetson Nano because of its large network size. In contrast, we successfully deployed the proposed algorithm on Jetson Nano. The latency of the proposed algorithm for Jetson Nano  
Figure 12: Examples for the joint inspection of screws, capacitors, mounting holes, three-pin chips, and eight-pin chips. **(a)** three-pin chips and eight-pin chips; **(b)** three-pin chips and eight-pin chips; **(c)** screws and mounting holes; **(d)** capacitors and mounting holes; **(e)** three-pin chips, eight-pin chips, capacitors, and mounting holes; **(f)** screws, three-pin chips, eight-pin chips, capacitors, and mounting holes.