Small PCB Defect Detection Based on Convolutional Block Attention Mechanism and YOLOv8
Source abstract
Abstract
Automated defect detection in printed circuit boards (PCBs) is a critical process for ensuring the quality and reliability of electronic products. To address the limitations of existing detection methods, such as insufficient sensitivity to minor defects and limited recognition accuracy in complex backgrounds, this paper proposes an enhanced YOLOv8 detection framework. The core contribution lies not merely in the integration of the Convolutional Block Attention Module (CBAM), but in a principled and task-specific integration strategy designed to address the multi-scale and low-contrast nature of PCB defects. The complete CBAM is integrated into the multi-scale feature layers (P3, P4, P5) of the YOLOv8 backbone network. By leveraging sequential channel and spatial attention submodules, CBAM guides the model to dynamically optimise feature responses, thereby significantly enhancing feature extraction for tiny, morphologically diverse defects. Experiments on a public PCB defect dataset demonstrate that the proposed model achieves a mean average precision (mAP@50) of 98.8% while maintaining real-time inference speed, surpassing the baseline YOLOv8 model by 9.5%, with the improvements of 7.4% in precision and 12.3% in recall. While the model incurs a higher computational cost (79.4 GFLOPs), it maintains a real-time inference speed of 109.11 FPS, offering a viable trade-off between accuracy and efficiency for high-precision industrial inspection. The proposed model demonstrates superior performance in detecting small-scale defects, making it highly suitable for industrial deployment.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Industrial Vision Systems and Defect Detection · Advanced Neural Network Applications · Advanced Data and IoT Technologies
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
School of Electrical and Computer Engineering, University of Sydney, Sydney 2006, Australia
School of Mathematics and Physics, Beijing University of Chemical Technology, Beijing 102200, China
School of Artificial Intelligence, University of Chinese Academy of Sciences, Beijing 100049, China
References (41)
Show source-provided references
1. A Critical Review of Smart Manufacturing in Electronics Industry: Perspectives from Data-Driven Process Optimization
2. Machine Vision-based Defect Detection in Printed Circuit Boards: A Survey
3. Deep Learning for Automated Visual Inspection in Manufacturing: A Survey of Methods and Challenges
4. Putera, S.H.I., and Ibrahim, Z. (2010, January 22–24). Printed circuit board defect detection using mathematical morphology and MATLAB image processing tools. Proceedings of the 2010 2nd International Conference on Education Technology and Computer, Shanghai, China.
5. Chauhan, A.P.S., and Bhardwaj, S.C. (2011, January 6–8). Detection of bare PCB defects by image subtraction method using machine vision. Proceedings of the World Congress on Engineering, London, UK.
6. Xu, W.-J., Xin, D.-J., Yang, L., Zhou, Y.-K., Wang, D., and Li, W.-X. (2024). High-Speed Signal Optimization at Differential VIAs in Multilayer Printed Circuit Boards. Electronics, 13.10.3390/electronics13173377 ↗
7. Tsai, C.H., and Lin, H.Y. (June, January 30). A YOLO-based Real-time Tiny Defect Detection System for Printed Circuit Boards. Proceedings of the 2021 IEEE International Conference on Robotics and Automation (ICRA), Xi’an, China.
8. Deep Learning for Generic Object Detection: A Survey10.1007/s11263-019-01247-4 ↗
9. Imbalanced Data Learning in Deep Industrial Defect Inspection: A Review
10. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017, January 4–9). Attention is All You Need. Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), Long Beach, CA, USA.
11. Jocher, G., Chaurasia, A., and Qiu, J. (2025, December 11). YOLO by Ultralytics. Available online: https://github.com/ultralytics/ultralytics.
12. Squeeze-and-Excitation Networks10.1109/TPAMI.2019.2913372 ↗
13. Woo, S., Park, J., Lee, J.-Y., and Kweon, I.S. (2018, January 8–14). CBAM: Convolutional Block Attention Module. Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany.10.1007/978-3-030-01234-2_1 ↗
14. Haobo, Y. (2024, January 8–12). A Survey of Industrial Surface Defect Detection Based on Deep Learning. Proceedings of the 2024 International Conference on Cyber-Physical Social Intelligence (ICCSI), Doha, Qatar.10.1109/ICCSI62669.2024.10799405 ↗
15. Kim, J., Nguyen, T., and Park, S. (2018, January 21–25). Convolutional Neural Network-based PCB Defect Classification with Limited Training Data. Proceedings of the 2018 IEEE International Conference on Robotics and Automation (ICRA), Brisbane, Australia.10.1109/MRA.2018.2873031 ↗
16. A Comprehensive Review of Deep Learning-based Methods for Industrial Surface Defect Detection
17. Kim, J., Ko, J., Choi, H., and Kim, H. (2021). Printed Circuit Board Defect Detection Using Deep Learning via a Skip-Connected Convolutional Autoencoder. Sensors, 21.10.3390/s21154968 ↗
18. TDD-net: A tiny defect detection network for printed circuit boards10.1049/trit.2019.0019 ↗
19. Liu, W., Anguelov, D., Erhan, D., Szegedy, C., and Reed, S. (2016, January 11–14). SSD: Single Shot MultiBox Detector. Proceedings of the Computer Vision–ECCV 2016, Amsterdam, The Netherlands.10.1007/978-3-319-46448-0_2 ↗
20. Object Detection in 20 Years: A Survey10.1109/JPROC.2023.3238524 ↗
21. Adibhaila, V.A., Sharma, P., Su, J., and Wang, H. (2020). Defect detection in printed circuit boards using you-only-look-once convolutional neural networks. Electronics, 9.10.3390/electronics9091547 ↗
22. Du, B., Huang, Y., Chen, J., and Li, D. (2023). YOLO-MBBi: PCB Surface Defect Detection Method Based on Enhanced YOLOv5. Electronics, 12.10.3390/electronics12132821 ↗
23. Lin, T.-Y., Dollár, P., Girshick, R., He, K., Hariharan, B., and Belongie, S. (2017, January 21–26). Feature Pyramid Networks for Object Detection. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA.10.1109/CVPR.2017.106 ↗
24. Bochkovskiy, A., Wang, C.-Y., and Liao, H.-Y.M. (2020). YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv.
25. Cao, Y., Xu, J., Lin, S., Wei, B., and Hu, H. (2019, January 27–28). GCNet: Non-local Networks Meet Squeeze-Excitation Networks and Beyond. Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops, Seoul, Republic of Korea.10.1109/ICCVW.2019.00246 ↗
26. Liu, S., Qi, L., Qin, H., Shi, J., and Jia, J. (2018, January 18–22). Path Aggregation Network for Instance Segmentation. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA.10.1109/CVPR.2018.00913 ↗
27. Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., and Zagoruyko, S. (2020, January 23–28). End-to-End Object Detection with Transformers. Proceedings of the Computer Vision–ECCV 2020, Glasgow, UK.10.1007/978-3-030-58452-8_13 ↗
28. Wang, C.Y., Bochkovskiy, A., and Liao, H.Y.M. (2023, January 18–22). YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada.10.1109/CVPR52729.2023.00721 ↗
29. A YOLOv3-based Method for Steel Surface Defect Detection Using Non-local Neural Networks
30. Ge, Z., Liu, S., Wang, F., Li, Z., and Sun, J. (2021). YOLOX: Exceeding YOLO Series in 2021. arXiv.
31. Li, X., Wang, W., Yang, L., Yang, J., and Yan, J. (2020, January 6–12). Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection. Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), Vancouver, BC, Canada.
32. Fu, J., Liu, J., Tian, H., Wei, Z., Fang, Y., and Lu, H. (2019, January 16–20). Dual Attention Network for Scene Segmentation. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA.10.1109/CVPR.2019.00326 ↗
33. Zheng, Z., Wang, P., Liu, W., Li, J., Ye, R., and Ren, D. (2020, January 7–12). Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression. Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA.10.1609/aaai.v34i07.6999 ↗
34. Tan, M., Pang, R., and Le, Q.V. (2020, January 13–19). EfficientDet: Scalable and Efficient Object Detection. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA.10.1109/CVPR42600.2020.01079 ↗
35. Redmon, J., and Farhadi, A. (2018). YOLOv3: An Incremental Improvement. arXiv.
36. Redmon, J., Divvala, S., Girshick, R., and Farhadi, A. (July, January 26). You Only Look Once: Unified, Real-Time Object Detection. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA.
37. (2025, December 20). Peking University Open LAb Dataset. Available online: https://robotics.pkusz.edu.cn/resources/dataset.
38. Enhancing geometric factors in model learning and inference for object detection and instance segmentation10.1109/TCYB.2021.3095305 ↗
39. Recent Advances in Small Object Detection: A Survey
40. Zhang, H., Chang, H., Ma, B., Chen, X., and Wang, N. (2020, January 23–28). Dynamic R-CNN: Towards High Quality Object Detection via Dynamic Training. Proceedings of the Computer Vision–ECCV 2020, Glasgow, UK.10.1007/978-3-030-58555-6_16 ↗
41. Dual Attention Guided Network for Fabric Defect Detection