## 3 Results and Discussion
### Performance Evaluation of Defect Detection  
In order to evaluate the effect of training in defect detection, the YOLO11 model was trained on two sets of data: using only simulated images and hybrid data of simulated and infrared images and performing defect detection in simulated images and real infrared images, respectively. Before evaluating the results, the following evaluation indicators need to be briefly explained. Precision and recall are important indicator parameters, which are calculated from \(TP\), \(FP\), and \(FN\), as shown in Equations (1) and (2):  
\[\text{Precision}=\frac{TP}{TP+FP} \tag{1}\]  
\[\text{Recall}=\frac{TP}{TP+FN} \tag{2}\]  
where \(TP\) refers to the model correctly detecting an object, \(FP\) refers to the model incorrectly detecting an object (including incorrect category or no object), and \(FN\) refers to the model not detecting an actual object. Precision indicates how many of the detected objects are correct. The closer its value is to \(1\), the more accurate the detection. And recall indicates  
Figure 9: Infrared thermal images and optical images of real defective samples in the experiment: (**a**,**b**) solder ball bridged, (**c**,**d**) missing solder ball. Infrared anomalies correspond to thermal conduction disruptions as analyzed in Section 3.1.  
how many of all the real objects the model has found. The closer its value is to 1, the more it has detected. Under ideal conditions, both precision and recall need to be high. Therefore, with precision as the vertical axis and recall as the horizontal axis, multiple (precision and recall) points are plotted through different confidence thresholds to form a PR curve. The area enclosed by the curve and the coordinate axis is AP (average precision). mAP is the average of APs of multiple categories. Its calculation is shown in Equations (3) and (4):  
\[AP=\int\limits_{0}^{1}p(r)dr \tag{3}\]  
\[mAP=\frac{1}{N}\sum\limits_{i=1}^{N}AP_{i} \tag{4}\]  
The PR curve in Equation (3) is \(p=p(r)\): \(N\) is the number of classification categories in Equation (4), and the subscript \(i\) is the \(i\)th category. In order to refine the accuracy reference indicators in different fields, two indicators, mAP50 and mAP50-95, are introduced here. mAP50 is \(IoU\geq 0.5\) to calculate the mAP of all categories when. At this time, the evaluation accuracy is relatively loose, so mAP50 is suitable for the accuracy evaluation of lightweight models or rapid deployment. mAP50-95 calculates the mAP for every 0.05 interval from IoU from 0.5 to 0.95 and then takes the average. Therefore, mAP50-95 can better reflect the actual detection quality of the model than mAP50 and is suitable for more rigorous accuracy evaluation. The numbers contained in the two indicators refer to the intersection over union (IoU), which is defined by Equation (5):  
\[IoU=\frac{|A\cap B|}{|A\cup B|} \tag{5}\]  
where the set \(A\) refers to the set of predicted boxes, the set \(B\) is the set of real boxes, the numerator refers to the overlapping area of the predicted box and the real box, and the denominator refers to the total coverage area of the two boxes. The ratio ranges from \([0,1]\). In addition, in the object detection network, the frame rate (frames per second, FPS) is often used to measure the inference speed of the model. In the actual training process, the calculation of FPS is shown in Equation (6):  
\[FPS=\frac{1}{t_{pre}+t_{i}+t_{post}} \tag{6}\]  
where \(t_{pre}\) refers to the image pre-processing time, \(t_{i}\) refers to the image inference time, and \(t_{post}\) refers to the image postprocessing time. The larger the FPS value, the faster the model detection speed. As for model complexity, commonly used indicators are model parameter quantity (params) and computation quantity (floating-point operations per second, FLOPs), which correspond to spatial complexity and time complexity respectively.