Skip to main content

Advertisement

Log in

ASTKD-PCB-LDD: high-performance PCB defect detection model with align soft-target knowledge distillation and lightweight network design

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

Abstract

Defects in printed circuit boards (PCBs) can degrade the performance and reliability of electronic devices. Although YOLOv5-based algorithms are commonly used to detect PCB defects, their complex parameters slow down detection speeds on industrial platforms. This paper presents a lightweight, high-performance model for PCB defect detection, called Align Soft-Target Knowledge Distillation PCB Lightweight Defect Detection (ASTKD-PCB-LDD). The model uses the k-means++ algorithm for optimal anchor box selection and the SCYLLA-IoU (SIoU) loss function to improve accuracy in detecting small defects. The Faster-Ghost backbone network and slim-neck architecture reduce computational load and improve inference speed. Additionally, Align Soft-Target Knowledge Distillation (ASTKD) is applied, with the PCB-LDD model as the teacher and a pruned model-created using Layer-Adaptive Magnitude-based Pruning (LAMP)-as the student. This strategy helps to maintain detection accuracy while reducing model size. Experimental results show that the model size is reduced from 14.5 to 4 MB (a 27.6\(\%\) reduction), achieving 98\(\%\) mean average precision (mAP), and the detection speed increases from 73.2 frames/s to 112.3 frames/s, improving by 153.4\(\%\). Moreover, the model demonstrates strong applicability and scalability. This approach effectively combines performance and lightweight design, significantly enhancing PCB defect detection efficiency.

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

Similar content being viewed by others

Data availability

Data will be made available on request.

References

  1. Tsai D-M, Chou Y-H (2019) Fast and precise positioning in PCBS using deep neural network regression. IEEE Trans Instrum Meas 69(7):4692–4701

    Article  MATH  Google Scholar 

  2. Girshick R, 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 pp 580–587

  3. He K, Zhang X, Ren S, Sun J (2015) Spatial pyramid pooling in deep convolutional networks for visual recognition. IEEE Trans Pattern Anal Mach Intell 37(9):1904–1916

    Article  MATH  Google Scholar 

  4. Ren S, He K, Girshick R, Sun J (2015) Faster r-CNN: towards real-time object detection with region proposal networks. Adv Neural Inf Process Syst 28

  5. Liu W, Anguelov D, Erhan D, Szegedy C, Reed S, Fu CY, Berg AC (2016) SSD: Single shot multibox detector. In: Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11–14, 2016, Proceedings, Part I 14, pp 21–37. Springer

  6. Redmon J, Divvala S, Girshick R, Farhadi A (2016) You only look once: unified, real-time object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition pp 779–788

  7. Redmon J, Farhadi A (2017) YOLO9000: better, faster, stronger. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition pp 7263–7271

  8. Redmon J, Farhadi A (2018) YOLO3: an incremental improvement. arXiv preprint arXiv:1804.02767

  9. Bochkovskiy A, Wang CY, Liao HYM (2020) YOLO4: optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934

  10. Li C, Li L, Jiang H, Weng K, Geng Y, Li L, Ke Z, Li Q, Cheng M, Nie W et al. (2022) Yolov6: a single-stage object detection framework for industrial applications. arXiv preprint arXiv:2209.02976

  11. Wang CY, Bochkovskiy A, Liao HYM (2023) YOLOv7: trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition pp 7464–7475

  12. Adibhatla VA, Chih HC, Hsu CC, Cheng J, Abbod MF, Shieh JS (2021) Applying deep learning to defect detection in printed circuit boards via a newest model of you-only-look-once

  13. Chen W, Huang Z, Mu Q, Sun Y (2022) PCB defect detection method based on transformer-yolo. IEEE Access 10:129480–129489

    Article  MATH  Google Scholar 

  14. 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(7):5963

    Article  MATH  Google Scholar 

  15. Du B, Wan F, Lei G, Xu L, Xu C, Xiong Y (2023) YOLO-MBBi: PCB surface defect detection method based on enhanced YOLOv5. Electronics 12(13):2821

    Article  MATH  Google Scholar 

  16. Ye M, Wang H, Xiao H (2023) Light-YOLOv5: a lightweight algorithm for improved YOLOv5 in PCB defect detection. In: 2023 IEEE 2nd International Conference on Electrical Engineering, Big Data and Algorithms (EEBDA), pp. 523–528. IEEE

  17. Li D, Xu A, Yu X (2023) Optimized lightweight PCB real-time defect detection algorithm. In: 2023 IEEE 16th International Conference on Electronic Measurement & Instruments (ICEMI) pp 262–269. IEEE

  18. Qian X, Wang X, Yang S, Lei J (2022) LFF-YOLO: a YOLO algorithm with lightweight feature fusion network for multi-scale defect detection. IEEE Access 10:130339–130349

    Article  Google Scholar 

  19. Hartigan JA, Wong MA (1979) Algorithm as 136: a k-means clustering algorithm. J R Stat Soc Ser C Appl Stat 28(1):100–108

    MATH  Google Scholar 

  20. Chen J, Kao SH, He H, Zhuo W, Wen S, Lee CH, Chan SHG (2023) Run, don’t walk: chasing higher flops for faster neural networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition pp 12021–12031

  21. Han K, Wang Y, Tian Q, Guo J, Xu C, Xu C (2020) GhostNet: More features from cheap operations. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition pp 1580–1589

  22. Li H, Li J, Wei H, Liu Z, Zhan Z, Ren Q (2022) Slim-neck by GSConv: a better design paradigm of detector architectures for autonomous vehicles. arXiv preprint arXiv:2206.02424

  23. Gevorgyan Z (2022) SIoU loss: more powerful learning for bounding box regression. arXiv preprint arXiv:2205.12740

  24. Yang L, Zhou X, Li X, Qiao L, Li Z, Yang Z, Wang G, Li X (2023) Bridging cross-task protocol inconsistency for distillation in dense object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision pp 17175–17184

  25. Malinin A, Gales M (2019) Reverse KL-divergence training of prior networks: improved uncertainty and adversarial robustness. Adv Neural Inf Process Syst 32

  26. Lee J, Park S, Mo S, Ahn S, Shin J (2020) Layer-adaptive sparsity for the magnitude-based pruning. arXiv preprint arXiv:2010.07611

  27. 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(2):110–116

    Article  MATH  Google Scholar 

  28. Kisantal M, Wojna Z, Murawski J, Naruniec J, Cho, K (2019) Augmentation for small object detection. arXiv preprint arXiv:1902.07296

  29. Howard A, Sandler M, Chu G, Chen LC, Chen B, Tan M, Wang W, Zhu Y, Pang R, Vasudevan V et al. (2019) Searching for MobileNetv3. In: Proceedings of the IEEE/CVF International Conference on Computer Vision pp 1314–1324

  30. Ma N, Zhang X, Zheng H-T, Sun J (2018) ShuffleNet V2: Practical guidelines for efficient CNN architecture design. In: Proceedings of the European Conference on Computer Vision (ECCV) pp 116–131

  31. Fang G, Ma X, Song M, Mi MB, Wang X (2023) Depgraph: towards any structural pruning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition pp 16091–16101

  32. Shu C, Liu Y, Gao J, Yan Z, Shen C (2021) Channel-wise knowledge distillation for dense prediction. In: Proceedings of the IEEE/CVF International Conference on Computer Vision pp 5311–5320

  33. Yang Z, Li Z, Shao M, Shi D, Yuan Z, Yuan C (2022) Masked generative distillation. In: European Conference on Computer Vision pp 53–69. Springer

  34. Glučina M, Anj̣elić N, Lorencin I, Car Z (2023) Detection and classification of printed circuit boards using YOLO algorithm. Electronics 12(3):667

    Article  Google Scholar 

  35. Ling Q, Isa NAM, Asaari MSM (2023) Precise detection for dense PCB components based on modified YOLOv8. IEEE Access

  36. Long Y, Li Z, Cai Y, Zhang R, Shen K (2023) PCB defect detection algorithm based on improved YOLOv8. Acad J Sci Technol 7(3):297–304

    Article  MATH  Google Scholar 

  37. Zhang L, Chen J, Chen J, Wen Z, Zhou X (2024) LDD-Net: lightweight printed circuit board defect detection network fusing multi-scale features. Eng Appl Artif Intell 129:107628

    Article  Google Scholar 

Download references

Funding

This work was supported by the Key Projects for Postgraduate Students of Hunan Provincial Department of Education (No. CX20210742).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lijun Tang.

Ethics declarations

Conflict of interest

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

Preprint declaration

An earlier version of this work, titled "ASTKD-PCB-LDD: A Lightweight High Performance PCB Defect Detection Algorithm," was published as a preprint on Research Square (DOI: https://doi.org/10.21203/rs.3.rs-4008736/v1). This manuscript includes important revisions and additional experimental results that were not part of the preprint.

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

Hu, Z., Zhang, Z., Liu, S. et al. ASTKD-PCB-LDD: high-performance PCB defect detection model with align soft-target knowledge distillation and lightweight network design. J Supercomput 81, 531 (2025). https://doi.org/10.1007/s11227-025-07045-9

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11227-025-07045-9

Keywords