## 5 Experimental Results  
### Data Inspection and Preparation  
Data Collection (presentation of meaning and images of the seven types of defects).  
In this study, if 10% of the total workpieces were judged to be defective based on the visual inspection results of the workers, the goal was to detect the remaining 1% as defective by applying the RT-DETR model. Therefore, PCBs that were detected as defective based on visual inspection were used. After positioning the PCB on the circular stage using a fixed frame, it was rotated at angles of 0\({}^{\circ}\), 90\({}^{\circ}\), 180\({}^{\circ}\), and 270\({}^{\circ}\), and photographed from the side four times.  
Figure 10 shows seven types of collected defect datasets. (a) shows soldering without component mounting. (b) shows excessive solder applied to the left part of the middle component, which can cause side effects such as short circuits by connecting to surrounding components. (c) shows a defect in which soldiers that should be separated are combined, resulting in a short circuit. (d) shows foreign material included during the soldering process. (e) shows a defect in which the soldering part was separated from the board during the cooling process after soldering. (f) shows a defect in which the soldering area was damaged. (g) shows a defect where soldering was performed with an incorrectly positioned component.  
The total number of images for training was 7159, with one object per image. There were seven types of defects: missing SMT components, excessive solder, solder bridging, foreign material, lifted solder, scratches, and misaligned SMT Component (see Figure 10). The number of defects in the dataset is as listed in Table 1.  
The class labeling for each object was boxed into a rectangular shape using the LabelImg tool, and an example is shown in Figure 11.  
Figure 8: The encoder structure for each variant.  
Figure 9: Fusion block in CCFF.  
In the case of lifted solder defects, capturing an image from a top-down angle makes it challenging to clearly observe the lifted part. Therefore, the camera was tilted to capture images from the side for better identification, as shown in Figure 12.  
The experiment was conducted on an Intel(R) Xeon(R) CPU (Santa Clara, CA, USA) @ 2.20 GHz with 87,532,028 kB of memory and an NVIDIA A100-SXM4-40 GB GPU (Santa  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & **Missing** & **Excessive** & **Solder** & **Foreign** & **Lifted** & **Scratch** & **Misalignment** & **Total** \\  & **Component** & **Solder** & **Bridging** & **Material** & **Solder** & **Scratch** & **Misalignment** & **Total** \\ \hline Num & 1023 & 1083 & 1008 & 1026 & 1000 & 1015 & 1004 & 7159 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Composition of the PCB Defect Dataset.  
Figure 11: Data example and annotation.  
Figure 12: Image of lifted solder defect captured from the side, rotated 90\({}^{\circ}\) four times.  
Figure 10: (a) Missing component; (b) Excessive soldering; (c) Overlapping soldering; (d) Foreign material insertion; (e) Lifting; (f) Scratch; (g) Misalignment.  
Clara, CA, USA). The dataset used for training was divided into training, validation, and test sets in a 6:2:2 ratio and trained using the RT-DETR model. The training hyperparameters included image size 640 \(\times\) 640, a momentum of 0.937, a learning rate of 0.000909, a batch size of 16, training period of 30, and the AdamW optimizer.  
As shown in Table 2, the dataset used for training and validation consisted of 5726 PCB images with a resolution of 640 \(\times\) 640. The layer configuration is shown in Figure 13.  
\begin{table}
\begin{tabular}{|c c c c|} \hline  & **Train** & **Validation** & **Test** \\ \hline \multicolumn{3}{|c|}{**Num**} & 4295 & 1431 & 1433 \\ \hline \end{tabular}
\end{table}
Table 2: Composition of the Model Training Dataset.  
Figure 13: Network structure diagram.