Skip to main content

Advertisement

Log in

DSRF: few-shot PCB surface defect detection via dynamic selective regulation fusion

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Defect detection in printed circuit board (PCB) is critical to quality control in their production process. Conventional detection methods rely on a large number of annotated images, while the acquisition of defect samples is time-consuming and labor-intensive. Few-shot object detection detects novel classes with a few instances and attracts an increased interest. We propose a dynamic selective regulation fusion method (DSRF) for few-shot PCB surface defect detection. Concretely, we design a selective feature enhancement (SFE) module that focuses on foreground information while suppressing irrelevant background details, enabling more effective utilization of useful information in defective samples. Additionally, we introduce a channel regulation transformation (CRT) module that enhances the detection capability of the network by constructing inter-channel relationships and capturing key information about tiny defects. In order to overcome the shortcomings of existing meta-learning methods in query image perception, we introduce a dynamic information fusion (DIF) module to effectively integrate the information in the query branch into the support branch, and to improve the feature expression ability of the support features. Experiments on the PCB datasets demonstrate that our method significantly outperforms state-of-the-art baselines across different sample settings. Our method not only achieves significant improvement in accuracy, but also demonstrates superiority in handling few-shot data, providing an effective solution for PCB defect detection. Code is available at https://github.com/lydcv/DSRF.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

Data availability

All data generated or analyzed in this study are included in this paper. Code availability: Our code is available at https://github.com/lydcv/DSRF.

References

  1. Jia L, Chen C, Liang J, Hou Z (2017) Fabric defect inspection based on lattice segmentation and gabor filtering. Neurocomputing 238:84–102

    Article  MATH  Google Scholar 

  2. Zheng J, Sun X, Zhou H, Tian C, Qiang H (2019) Automatic inspection of salt-and-pepper defects in OLED panels using image processing and control chart techniques. J Intell Manufact 30:1047–1055

    Article  MATH  Google Scholar 

  3. Zheng J, Sun X, Zhou H, Tian C, Qiang H (2022) Printed circuit boards defect detection method based on improved fully convolutional networks. IEEE Access 10:109908–109918

    Article  Google Scholar 

  4. Girshick RB, Donahue J, Darrell T, Malik J (2014) Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp 580–587

  5. Niu J, Huang J, Cui L, Zhang B, Zhu A (2022) A pcb defect detection algorithm with improved faster r-cnn. In: Proceedings of the 3rd International Conference on Big Data & Artificial Intelligence & Software Engineering (ICBASE), pp 283–292

  6. Ren S, He K, Girshick RB, Sun J (2015) Faster r-cnn: Towards real-time object detection with region proposal networks. In: Advances in Neural Information Processing Systems (NeurIPS), pp 91–99

  7. Zeng N, Wu P, Wang Z, Li H, Liu W, Liu X (2022) A small-sized object detection oriented multi-scale feature fusion approach with application to defect detection. IEEE Trans Instr Measure 71:1–14

    MATH  Google Scholar 

  8. Zhang H, Jiang L, Li C (2021) Cs-resnet: cost-sensitive residual convolutional neural network for pcb cosmetic defect detection. Expert Syst Appl 185:115673

    Article  Google Scholar 

  9. Redmon J, Divvala SK, Girshick RB, Farhadi A (2016) You only look once: Unified, real-time object detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp 779–788

  10. Tang J, Wang Z, Zhang H, Li H, Wu P, Zeng N (2024) A lightweight surface defect detection framework combined with dual-domain attention mechanism. Expert Syst Appl 238:121726

    Article  MATH  Google Scholar 

  11. Tang J, Liu S, Zhao D, Tang L, Zou W, Zheng B (2023) Pcb-yolo: an improved detection algorithm of pcb surface defects based on yolov5. Sustainability 15:5963

    Article  MATH  Google Scholar 

  12. Snell J, Swersky K, Zemel RS (2017) Prototypical networks for few-shot learning. In: Advances in Neural Information Processing Systems (NeurIPS), pp 4077–4087

  13. Wang T, Zhang X, Yuan L, Feng J (2019) Few-shot adaptive faster r-cnn. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp 7173–7182

  14. Yan X, Chen Z, Xu A, Wang X, Liang X, Lin L (2019) Meta r-cnn: Towards general solver for instance-level low-shot learning. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp 9577–9586

  15. Han J, Ren Y, Ding J, Yan K, Xia G (2023) Few-shot object detection via variational feature aggregation. In: AAAI Conference on Artificial Intelligence (AAAI), pp 755–763

  16. Zhang G, Luo Z, Cui K, Lu S, Xing EP (2023) Meta-detr: image-level few-shot detection with inter-class correlation exploitation. IEEE Trans Pattern Anal Mach Intell 45:12832–12843

    Google Scholar 

  17. Zhu X, Su W, Lu L, Li B, Wang X, Dai J (2021) Deformable detr: Deformable transformers for end-to-end object detection. In: International Conference on Learning Representations (ICLR)

  18. Han G, Ma J, Huang S, Chen L, Chang SF (2022) Few-shot object detection with fully cross-transformer. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp 5321–5330

  19. Wang W, Xie E, Li X, Fan DP, Song K, Liang D, Lu T, Luo P, Shao L (2021) Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp 568–578

  20. Yang Z, Zhu L, Wu Y, Yang Y (2020) Gated channel transformation for visual recognition. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp 11794–11803

  21. Wu J, Le J, Xiao Z, Zhang F, Geng L, Liu Y, Wang W (2021) Automatic fabric defect detection using a wide-and-light network. Appl Intell 51:4945–4961

    Article  MATH  Google Scholar 

  22. Ding R, Dai L, Li G, Liu H (2019) Tdd-net: a tiny defect detection network for printed circuit boards. CAAI Trans Intell Technol 4:110–116

    Article  MATH  Google Scholar 

  23. Zhang Y, Wang W, Li Z, Shu S, Lang X, Zhang T, Dong J (2023) Development of a cross-scale weighted feature fusion network for hot-rolled steel surface defect detection. Eng Appl Artific Intell 117:105628

    Article  MATH  Google Scholar 

  24. Lin Q, Zhou J, Ma Q, Ma Y, Kang LL, Wang J (2022) Emra-net: a pixel-wise network fusing local and global features for tiny and low-contrast surface defect detection. IEEE Trans Instr Measure 71:1–14

    MATH  Google Scholar 

  25. Wu J, Liu S, Huang D, Wang Y (2020) Multi-scale positive sample refinement for few-shot object detection. In: European conference on computer vision (ECCV), pp 456–472

  26. Kaul P, Xie W, Zisserman A (2022) Label, verify, correct: A simple few shot object detection method. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp 14237–14247

  27. Ma J, Xie H, Han G, Chang S, Galstyan A, Abd-Almageed W (2021) Partner-assisted learning for few-shot image classification. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp 10573–10582

  28. Sung F, Yang Y, Zhang L, Xiang T, Torr PHS, Hospedales TM (2018) Learning to compare: Relation network for few-shot learning. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp 1199–1208

  29. Ypsilantis N, Garcia N, Han G, Ibrahimi S, van Noord N, Tolias G (2021) The met dataset: Instance-level recognition for artworks. In: Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks

  30. Xiao Y, Lepetit V, Marlet R (2020) Few-shot object detection and viewpoint estimation for objects in the wild. In: European conference on computer vision (ECCV), pp 192–210

  31. Han G, Huang S, Ma J, He Y, Chang S (2022) Meta faster r-cnn: Towards accurate few-shot object detection with attentive feature alignment. In: AAAI Conference on Artificial Intelligence (AAAI), pp 780–789

  32. Wang X, Huang TE, Gonzalez J, Darrell T, Yu F (2020) Frustratingly simple few-shot object detection. In: International Conference on Machine Learning (ICML)

  33. Qiao L, Zhao Y, Li Z, Qiu X, Wu J, Zhang C (2021) Defrcn: Decoupled faster r-cnn for few-shot object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp 8681–8690

  34. Chen T, Liu Y, Su H, Chang Y, Lin Y, Yeh J, Chen W, Hsu WH (2021) Dual-awareness attention for few-shot object detection. IEEE Trans Multimed 25:291–301

    Article  MATH  Google Scholar 

  35. Kang B, Liu Z, Wang X, Yu F, Feng J, Darrell T (2019) Few-shot object detection via feature reweighting. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp 8420–8429

  36. Lu X, Diao W, Mao Y, Li J, Wang P, Sun X, Fu K (2023) Breaking immutable: Information-coupled prototype elaboration for few-shot object detection. In: AAAI Conference on Artificial Intelligence (AAAI), pp 1844–1852

  37. Zhang L, Zhou S, Guan J, Zhang J (2021) Accurate few-shot object detection with support-query mutual guidance and hybrid loss. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp 14424–14432

  38. Wang Z, Yang B, Yue H, Ma Z (2024) Fine-grained prototypes distillation for few-shot object detection. In: AAAI Conference on Artificial Intelligence (AAAI), pp 5859–5866

  39. Krizhevsky A, Sutskever I, Hinton GE (2012) Imagenet classification with deep convolutional neural networks. In: Advances in Neural Information Processing Systems (NeurIPS), pp 1106–1114

  40. Tang S, He F, Huang X, Yang J (2019) Online pcb defect detector on a new pcb defect dataset. ArXiv

  41. Huang W, Wei P (2019) A pcb dataset for defects detection and classification. ArXiv

  42. Deng J, Li X, Fang Y (2020) Few-shot object detection on remote sensing images. IEEE Transactions on Geoscience and Remote Sensing pp 1–14

  43. Sun B, Li B, Cai S, Yuan Y, Zhang C (2021) Fsce: Few-shot object detection via contrastive proposal encoding. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp 7352–7362

  44. Zhang T, Zhang X, Zhu P, Jia X, Tang X, Jiao L (2023) Generalized few-shot object detection in remote sensing images. ISPRS J Photogram Remote Sens 195:353–364

    Article  MATH  Google Scholar 

  45. Chen K, Wang J, Pang J, Cao Y, Xiong Y, Li X, Sun S, Feng W, Liu Z, Xu J, Zhang Z, Cheng D, Zhu C, Cheng T, Zhao Q, Li B, Lu X, Zhu R, Wu Y, Dai J, Wang J, Shi J, Ouyang W, Loy CC, Lin D (2019) Mmdetection: Open mmlab detection toolbox and benchmark. ArXiv

  46. He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp 770–778

Download references

Author information

Authors and Affiliations

Authors

Contributions

All authors contributed to the conception and design of the study. Li Yudong, Wang Shaoqing and Jing Zihao organized the data and designed the model. The first draft of the manuscript was written by Li Yudong, and all authors commented on previous version of the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Shaoqing Wang.

Ethics declarations

Conflict of interest

The authors declare that they have no competing financial interests or personal relationships that influence the work reported in this paper.

Ethical approval

Not applicable.

Consent to participate

Not applicable.

Consent for publication

Not applicable.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, Y., Wang, S., Jing, Z. et al. DSRF: few-shot PCB surface defect detection via dynamic selective regulation fusion. J Supercomput 81, 529 (2025). https://doi.org/10.1007/s11227-025-07071-7

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11227-025-07071-7

Keywords