## 1 Introduction  
As semiconductor packaging technology develops towards higher integration and stronger functional density, devices have put forward more stringent requirements for thermal reliability. Defects in the packaging structure, such as missing solder balls, faulty soldering of pad, bridging, etc., usually cause the heat flow conduction path to shift, resulting in abnormal local temperature rise, which may cause chip failure or even thermal damage. How to efficiently and accurately detect internal defects in the package has become one of the core challenges in chip manufacturing and packaging quality control. In terms of defect detection, traditional detection methods rely on visual inspection or single-mode imaging technology, which makes it difficult to meet the requirements of accurate and rapid identification of micron-level defects. In recent years, infrared imaging technology has become an important means of packaging defect detection due to its non-invasive thermal distribution capture capability. Due to its non-contact, real-time, and non-destructive characteristics, infrared defect detection technology has been applied in aerospace [1; 2; 3; 4], the automotive industry [5], construction [6; 7], the photovoltaic industry [8; 9], and chip packaging [10; 11]. At the same time, researchers have tried to use infrared thermal imaging to detect thermal anomalies inside chips, especially active heating infrared imaging [12; 13], which can observe thermal distribution distortion in a non-destructive manner to identify internal defects. Technologies such as infrared lock-in thermal imaging [14] and double-thermal imaging [15] have been continuously developed to improve temperature contrast and image accuracy. However, this technology still has limitations in terms of resolution, penetration depth, and noise immunity. In addition to infrared detection, finite-element analysis reveals the correlation mechanism between defects and temperature field distortion through multi-physics field modeling. It is widely used to model thermal-mechanical multi-physics field problems and has been successfully applied to chip thermal warpage prediction [16], material thermal conductivity difference analysis, and solder ball defect modeling [17]. The finite-element simulation method can systematically reveal the influence of defects on thermal field distribution and construct simulated samples to make up for the lack of experimental data. However, its challenge is that the modeling accuracy is limited by material parameters (such as thermal conductivity, heat capacity, and temperature-dependent behavior of metals and polymers) and computing costs, and its adaptability to batch scenarios still needs to be improved. With the support of infrared detection and finite-element simulation, deep learning algorithms provide reliable technical support for high-precision real-time detection. In defect detection, deep learning algorithms such as the YOLO series [18] have been widely used in industrial inspection tasks in recent years. They have the advantages of end-to-end training, strong small target recognition ability, and fast reasoning speed, and they are suitable for high-speed and high-precision defect localization in chip packaging. The proposed detection method is designed for inline full inspection. However, in practical production environments, either full inspection or sampling inspection can be applied depending on specific requirements such as throughput, cost, and quality assurance strategy. Many studies have applied algorithms such as YOLO v4 [19; 20], v5 [21], v7 [22], v8 [23], and YOLO X [24] to chip surface or internal defect detection and, combined with improvement strategies, to achieve improved detection accuracy. However, its performance is still limited under the conditions of small samples, cross-modal images, and data distribution offset. Relying solely on infrared or measured image training has the problem of insufficient robustness.