Few-Shot Defect Detection of Printed Circuit Board via Efficient Multiscale Channel Attention Mechanism and Adaptive Weight
Abstract
The scarcity of defect samples remains a major bottleneck for surface defect detection systems in printed circuit boards (PCB) manufacturing, particularly when identifying unseen or extremely tiny defects. While existing few-shot algorithms have shown promise in industrial inspection scenarios, they still struggle in the complex visual context of PCBs, where defects are often minuscule and embedded in highly repetitive, texture-rich backgrounds that mimic defect-like patterns. This leads to poor localization accuracy and high false-alarm rates, especially under extreme data scarcity. To address these limitations, an innovative framework for detecting defects on PCBs is proposed in this paper, utilizing few-shot detection via contrastive proposal encoding (FSCE). Firstly, an improved efficient multi-scale channel attention module (EMCAM) is introduced to enhance the ability to recognize tiny-defect features, which combines long-range and short-range features across spatial and channel dimensions and integrates feature weights on the channel dimension to suppress the feature response of non-essential areas. Then, combining EMCAM and Sigmoid normalization, a multidimensional feature adaptive weight module (MFAW) is created that adaptively modifies weight distribution before each dimension feature fusion, enhancing information interaction across different dimensions. Moreover, Double Head is used to decouple classification and location tasks to improve feature expression ability, and the CIOU loss function is introduced to enhance the stability for tiny-defect detection performance with few data. Finally, a series of comparative experiments on two public PCB defect datasets and industrial datasets verify the superiority of the proposed method, which further proves that the proposed method can effectively improve the expansion performance of the instrument for unseen PCB defects and provide a reference for defect location measurement.
Fields of Study & Subjects
Industrial Vision Systems and Defect Detection
Advanced Neural Network Applications
Infrastructure Maintenance and Monitoring
Publication details
- Journal / source
- IEEE Transactions on Instrumentation and Measurement
- Publisher
- Institute of Electrical and Electronics Engineers (IEEE)
- Volume
- 75
- Pages
- 1–14
- Publication date
- 1 January 2026