## 1 Introduction  
As an indispensable carrier of electronic components, a printed circuit board (PCB) can realize various circuit functions and plays an essential role in support, fixation, and heat dissipation [1]. Widely used across industries such as computing and telecommunications, PCBs constitute the primary components of nearly all electronic devices [2]. With the advent of the fourth industrial revolution, there are heightened demands regarding the levels of integration and quality in PCB manufacturing [3]. High-quality PCB products undergo stringent inspection procedures to ensure their stability and reliability [4]. The current efforts by electronic manufacturers to enhance the production quality focus on developing high-precision inspection methods, following the trend of \"zero-defect manufacturing\", aimed at minimizing defect occurrences as much as possible [5]. Given the complexity of PCB manufacturing processes, the emergence of various types of defects is inevitable [6], such as soldering defects, including missing solders, short solders, and solder balls. The quality of the soldering of electronic components mounted on PCBs greatly impacts the overall product quality. Soldering defects directly or indirectly affect the actual performance of the product. Therefore, conducting a solder quality inspection of PCBs is a crucial step in ensuring the compliance and reliability of the product. Conducting PCB defect detection not only optimizes PCB production lines and reduces the likelihood of defects but also contributes to resource conservation, minimizes capacity wastage, and improves resource utilization. Detecting PCB defects has become a crucial step in enhancing the PCB production quality, and businesses urgently require efficient PCB defect detection technologies to address this issue [7]. In the early stages of PCB manufacturing, defect detection relied primarily on visual inspection by workers [8], which has some obvious drawbacks. Firstly, it is heavily influenced by human factors, and the accuracy may vary depending on the skill level and fatigue of the workers. Secondly, with the increase in PCB production and the shrinkage of the line spacing and component volume, visual inspection becomes increasingly challenging. It fails to meet the requirements of modern industrial production levels. With technological advancements, PCB defect detection has gradually shifted toward utilizing advanced machine equipment technologies, such as automated optical inspection (AOI) [9], AOI technology primarily uses template matching or image recognition methods [10], significantly enhancing the detection efficiency. However, the detection outcome is directly affected by the template matching accuracy and lighting conditions, and the equipment still requires supervision, maintenance, and the interpretation of the results by skilled personnel [11]. The inefficiency of traditional detection methods underscores the crucial role of efficient and automated PCB defect detection in the inspection process. Currently, deep-learning-based detection methods have become the mainstream direction for PCB defect detection due to their high detection efficiency [12]. Deep-learning-based PCB defect detection mainly consists of two types of networks: object detection and semantic segmentation [13]. Object detection networks can be further divided into two-stage algorithms, represented by the Faster-RCNN algorithm [14], and single-stage algorithms, dominated by the SSD algorithm [15] and the YOLO series algorithm [16]. For example, [PERSON] et al. [17] proposed TDD-net for the detection of PCB defects by combining Faster-RCNN and a feature pyramid network, adopting the point of view that PCB defects account for a small percentage of the image, as well as considering the irregular shape of the defects. [PERSON] et al. [18] proposed an algorithm, named SSDT, for tiny defect detection based on SSD, which resulted in improved PCB surface defect detection accuracy. [PERSON] et al.