YOLO-AEB: PCB Surface Defect Detection Based on Adaptive Multi-Branch Attention and Efficient Atrous Spatial Pyramid Pooling
Abstract
1. Introduction
- Tiny defect detection limitations: With the improvement of PCB routing accuracy, the defect size is generally reduced to 0.1–0.5 mm2, which leads to the lack of feature representation ability of the network.
- Background interference susceptibility: defect-like texture noise generated by high-density wiring seriously reduces the feature discrimination of the model.
- A YOLO-AEB network based on improved YOLOv10 is proposed to achieve high-precision detection of tiny defects while ensuring the real-time requirements of industrial defect detection are met.
- The Adaptive Multi-branch Attention (AMBA) mechanism is innovatively designed. Unlike existing single-branch (e.g., ECA-Net [14]) or sequentially fused attention mechanisms (e.g., CBAM), AMBA employs parallel branches to extract channel, width, and context features simultaneously. Crucially, it introduces an Adaptive Reweighting Algorithm (ARA) to dynamically adjust the fusion weights of these branches based on the input defect type, overcoming the limitations of static, one-size-fits-all attention allocation.
- A novel Efficient Atrous Spatial Pyramid Pooling (EASPP) module is developed. EASPP represents the first integration of our proposed AMBA with hybrid dilated convolutions. This co-design not only expands the receptive field to mitigate feature loss but also incorporates defect-aware feature recalibration, enabling more precise multi-scale feature extraction compared to standard modules.
- The BiFPN structure is used for feature information fusion, and the bidirectional cross-scale feature fusion mechanism is used to improve the transmission ability of shallow detail features to deep networks.
2. Related Works
2.1. YOLO-Based Methods of PCB Defect Detection
2.2. Attention Mechanism
3. Methodology
3.1. Overall Framework of YOLO-AEB
3.2. Description of the Improvements
3.2.1. Adaptive Muti-Branch Attention (AMBA)
3.2.2. Efficient Atrous Spatial Pyramid Pooling (EASPP)
3.2.3. Bidirectional Feature Pyramid Network (BiFPN)
4. Experiments and Results
4.1. Design of Experiments
4.1.1. Experimental Environment
4.1.2. Datasets
4.1.3. Evaluation Indicators
4.2. Comparative Experimental
4.3. Ablation Experiments
4.3.1. Adaptive Muti-Branch Attention (AMBA)
4.3.2. Efficient Atrous Spatial Pyramid Pooling (EASPP)
4.3.3. Bidirectional Feature Pyramid Network (BiFPN)
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zhou, W.; Li, C.; Ye, Z.; He, Q.; Ming, Z.; Chen, J.; Wan, F.; Xiao, Z. An Efficient Tiny Defect Detection Method for PCB With Improved YOLO Through a Compression Training Strategy. IEEE Trans. Instrum. Meas. 2024, 73, 1–14. [Google Scholar] [CrossRef]
- Ibrahim, Z.; Al-Attas, S.A.R.; Aspar, Z.; Mokji, M.M. Performance evaluation of wavelet-based PCB defect detection and localization algorithm. In Proceedings of the 2002 IEEE International Conference on Industrial Technology, 2002, IEEE ICIT, Bankok, Thailand, 11–14 December 2002; Volume 1, pp. 226–231. [Google Scholar]
- Tsai, D.-M.; Huang, C.-K. Defect Detection in Electronic Surfaces Using Template-Based Fourier Image Reconstruction. IEEE Trans. Compon. Packag. Manuf. Technol. 2019, 9, 163–172. [Google Scholar] [CrossRef]
- Wang, Y.; Sun, Y.; Zhang, W. Automatic Inspection of Small Component on Loaded PCB Based on Mean-Shift and Support Vector Machine. In Proceedings of the 2009 Fifth International Conference on Natural Computation, Tianjian, China, 14–16 August 2009; pp. 195–198. [Google Scholar] [CrossRef]
- Huang, Z.; Xiao, H.; Zhang, R.; Wang, H.; Zhang, C.; Shi, X. Multi-Scale Feature Pair Based R-CNN Method for Defect Detection. In Proceedings of the 2019 International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), Atlanta, GA, USA, 14–17 July 2019; pp. 46–51. [Google Scholar] [CrossRef]
- Liu, Y. An Improved Faster R-CNN for Object Detection. In Proceedings of the 2018 11th International Symposium on Computational Intelligence and Design (ISCID), Hangzhou, China, 8–9 December 2018; pp. 119–123. [Google Scholar] [CrossRef]
- Yin, S.; Li, H.; Teng, L.; Laghari, A.A.; Almadhor, A.; Gregus, M.; Sampedro, G.A. Brain CT image classification based on mask RCNN and attention mechanism. Sci. Rep. 2024, 14, 29300. [Google Scholar] [CrossRef]
- Ma, W.; Wang, X.; Yu, J. A Lightweight Feature Fusion Single Shot Multibox Detector for Garbage Detection. IEEE Access 2020, 8, 188577–188586. [Google Scholar] [CrossRef]
- Hussain, M. YOLO-v1 to YOLO-v8, the Rise of YOLO and Its Complementary Nature toward Digital Manufacturing and Industrial Defect Detection. Machines 2023, 11, 677. [Google Scholar] [CrossRef]
- Fan, F.; Wang, B.; Zhu, G.; Wu, J. Efficient Faster R-CNN: Used in PCB Solder Joint Defects and Components Detection. In Proceedings of the 2021 IEEE 4th International Conference on Computer and Communication Engineering Technology (CCET), Beijing, China, 13–15 August 2021; pp. 1–5. [Google Scholar] [CrossRef]
- Lian, J.; Wang, L.; Liu, T.; Ding, X.; Yu, Z. Automatic visual inspection for printed circuit board via novel Mask R-CNN in smart city applications. Sustain. Energy Technol. Assess 2021, 44, 101032. [Google Scholar] [CrossRef]
- Chaudhari, A.; Upganlawar, V.; Barve, T.; Vaidya, R.; Shelke, D. Analysis of YOLO V3 for Multiple Defects Detection in PCB. In Proceedings of the 2024 Parul International Conference on Engineering and Technology (PICET), Vadodara, India, 3–4 May 2024; pp. 1–6. [Google Scholar] [CrossRef]
- Ye, M.; Wang, H.; Xiao, H. Light-YOLOv5: A Lightweight Algorithm for Improved YOLOv5 in PCB Defect Detection. In Proceedings of the 2023 IEEE 2nd International Conference on Electrical Engineering, Big Data and Algorithms (EEBDA), Changchun, China, 24–26 February 2023; pp. 523–528. [Google Scholar] [CrossRef]
- Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 11531–11539. [Google Scholar] [CrossRef]
- Wang, X.; Zhang, X.; Zhou, N. Improved YOLOv5 with BiFPN on PCB Defect Detection. In Proceedings of the 2021 2nd International Conference on Artificial Intelligence and Computer Engineering (ICAICE), Hangzhou, China, 5–7 November 2021; pp. 196–199. [Google Scholar] [CrossRef]
- Yang, B.; Qu, Z. A PCB Defect Detection Algorithm Based on Improved Yolov7-tiny. In Proceedings of the 2023 IEEE 5th International Conference on Civil Aviation Safety and Information Technology (ICCASIT), Dali, China, 11–13 October 2023. [Google Scholar]
- Liu, Y.; Gao, C.; Song, B.; Liang, S. A Surface Defect Detection Algorithm for PCB Based on MobileViT-YOLO. In Proceedings of the 2023 China Automation Congress (CAC), Chongqing, China, 17–19 November 2023; pp. 6318–6323. [Google Scholar] [CrossRef]
- Hua, L. Motor PCB Defect Detection Algorithm Based on Improved YOLOv7-tiny. In Proceedings of the 2024 6th International Conference on Electronic Engineering and Informatics (EEI), Chongqing, China, 28–30 June 2024; pp. 272–275. [Google Scholar] [CrossRef]
- Lan, H.; Zhu, H.; Luo, R.; Ren, Q.; Chen, C. PCB Defect Detection Algorithm of Improved YOLOv8. In Proceedings of the 2023 8th International Conference on Image, Vision and Computing (ICIVC), Dalian, China, 27–29 July 2023. [Google Scholar]
- Hu, Y.; Wang, S.; Hong, Y.; Li, R. A YOLOv8s Model Integrating GELAN Module and HAT Attention for PCB Defect Detection. In Proceedings of the 2024 5th International Conference on Electronic Communication and Artificial Intelligence (ICECAI), Shenzhen, China, 31 May–2 June 2024; pp. 297–300. [Google Scholar] [CrossRef]
- Selvam, P.; Rajasekar, R.; Gunasundari, C.; Janu Priya, S.; Murugappan, M.; Chowdhury, M.E.H. YOLO-DefXpert: An Advanced Defect Detection on PCB Surfaces Using Improved YOLOv11 Algorithm. IEEE Access 2025, 13, 143085–143101. [Google Scholar] [CrossRef]
- Yin, X.; Zhao, Z.; Weng, L. MAS-YOLO: A Lightweight Detection Algorithm for PCB Defect Detection Based on Improved YOLOv12. Appl. Sci. 2025, 15, 6238. [Google Scholar] [CrossRef]
- Wu, H.; Lin, Y. A High-Performance and Enhanced Generalization Small Target Defect Detection Method for PCB Boards Based on YOLO-EMAC. IEEE Trans. Instrum. Meas. 2025, 74, 5042513. [Google Scholar] [CrossRef]
- Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. YOLOv10: Real-Time End-to-End Object Detection. arXiv 2024, arXiv:2405.14458. [Google Scholar]
- Lu, G.; Zhang, W.; Wang, Z. Optimizing Depthwise Separable Convolution Operations on GPUs. IEEE Trans. Parallel Distrib. Syst. 2022, 33, 70–87. [Google Scholar] [CrossRef]
- Xiong, D.; Wen, Z.; Zhang, C.; Ren, D.; Li, W. BMNet: Enhancing Deepfake Detection Through BiLSTM and Multi-Head Self-Attention Mechanism. IEEE Access 2025, 13, 21547–21556. [Google Scholar] [CrossRef]
- Rezatofighi, H.; Zhu, T.; Kaskman, R.; Motlagh, F.T.; Shi, J.Q.; Milan, A.; Cremers, D.; Leal-Taixe, L.; Reid, I. Learn to Predict Sets Using Feed-Forward Neural Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 9011–9025. [Google Scholar] [CrossRef] [PubMed]
- Lee, H.; Lee, J.-S.; Choi, H.-C. Parallelization of Non-Maximum Suppression. IEEE Access 2021, 9, 166579–166587. [Google Scholar] [CrossRef]
- Mao, M.; Lee, A.; Hong, M. Efficient Fabric Classification and Object Detection Using YOLOv10. Electronics 2024, 13, 3840. [Google Scholar] [CrossRef]
- Hu, H.; Tong, J.; Wang, H.; Lu, X. EAD-YOLOv10: Lightweight Steel Surface Defect Detection Algorithm Research Based on YOLOv10 Improvement. IEEE Access 2025, 13, 55382–55397. [Google Scholar] [CrossRef]
- Mayya, A.M.; Alkayem, N.F. Enhance the Concrete Crack Classification Based on a Novel Multi-Stage YOLOV10-ViT Framework. Sensors 2024, 24, 8095. [Google Scholar] [CrossRef]
- Mei, J.; Zhu, W. BGF-YOLOv10: Small Object Detection Algorithm from Unmanned Aerial Vehicle Perspective Based on Improved YOLOv10. Sensors 2024, 24, 6911. [Google Scholar] [CrossRef]
- Liao, L.; Song, C.; Wu, S.; Fu, J. A Novel YOLOv10-Based Algorithm for Accurate Steel Surface Defect Detection. Sensors 2025, 25, 769. [Google Scholar] [CrossRef]
- Niu, Z.; Zhong, G.; Yu, H. A review on the attention mechanism of deep learning. Neurocomputing 2021, 452, 48–62. [Google Scholar] [CrossRef]
- Qin, C.; Zhou, Z. YOLO-FGD: A fast lightweight PCB defect method based on FasterNet and the Gather-and-Distribute mechanism. J. Real-Time Image Proc. 2024, 21, 122. [Google Scholar] [CrossRef]
- Yuan, M.; Zhou, Y.; Ren, X.; Zhi, H.; Zhang, J.; Chen, H. YOLO-HMC: An Improved Method for PCB Surface Defect Detection. IEEE Trans. Instrum. Meas. 2024, 73, 2001611. [Google Scholar] [CrossRef]
- Huang, W.; Wen, J.; Gan, W.; Hu, L.; Luo, B. Neighborhood Correlation Enhancement Network for PCB Defect Classification. IEEE Trans. Instrum. Meas. 2023, 72, 2506111. [Google Scholar] [CrossRef]
- Yue, Z.; Li, X.; Zhou, H.; Wang, G.; Wang, W. Real-time recognition method for PCB chip targets based on YOLO-GSG. J. Real-Time Image Proc. 2025, 22, 44. [Google Scholar] [CrossRef]
- Bai, L.; Xu, W.H. Improved printed circuit board defect detection scheme. Sci. Rep. 2025, 15, 2389. [Google Scholar] [CrossRef]
- Li, G.; Zhao, S.; Zhou, M.; Li, M.; Shao, R.; Zhang, Z.; Han, D. YOLO-RFF: An Industrial Defect Detection Method Based on Expanded Field of Feeling and Feature Fusion. Electronics 2022, 11, 4211. [Google Scholar] [CrossRef]
- Cui, H.; Wei, Z. Multi-Scale Receptive Field Detection Network. IEEE Access 2019, 7, 138825–138832. [Google Scholar] [CrossRef]
- Hu, J.-F.; Sun, J.; Lin, Z.; Lai, J.-H.; Zeng, W.; Zheng, W.-S. APANet: Auto-Path Aggregation for Future Instance Segmentation Prediction. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 3386–3403. [Google Scholar] [CrossRef] [PubMed]
- Zhao, B.; Guo, A.; Ma, R.; Zhang, Y.; Gong, J. YOLOv8s-CFB: A lightweight method for real-time detection of apple fruits in complex environments. J. Real-Time Image Proc. 2024, 21, 164. [Google Scholar] [CrossRef]
- Christlein, V.; Spranger, L.; Seuret, M.; Nicolaou, A.; Král, P.; Maier, A. Deep Generalized Max Pooling. In Proceedings of the 2019 International Conference on Document Analysis and Recognition (ICDAR), Sydney, NSW, Australia, 20–25 September 2019; pp. 1090–1096. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 1904–1916. [Google Scholar] [CrossRef] [PubMed]
- Huang, W.; Wei, P.; Zhang, M.; Liu, H. HRIPCB: A challenging dataset for PCB defects detection and classification. J. Eng. 2020, 2020, 303–309. [Google Scholar] [CrossRef]













| Classification | Precision | Recall | mAP@50 | F1 |
|---|---|---|---|---|
| Missing hole | 99.2% | 99.8% | 99.4% | 99.4% |
| Mouse bite | 97.5% | 86.6% | 94.2% | 91.7% |
| Open circuit | 97.6% | 89.9% | 96.3% | 93.6% |
| Short circuit | 98.9% | 98.7% | 99.4% | 98.7% |
| Spur | 97.7% | 88.6% | 93.5% | 92.9% |
| Spurious copper | 98% | 96.9% | 99.1% | 97.4% |
| All | 98.2% | 93.4% | 97.0% | 95.7% |
| Model | Precision | Recall | mAP@50 | F1 | FPS |
|---|---|---|---|---|---|
| Fast-RCNN | 61.4% | 75.6% | 76.1% | 67.8% | 48.19 |
| HAT-YOLOv8 | 96.0% | 92.6% | 91.3% | 94.2% | 73.31 |
| YOLO-BFRV | 96.8% | 92.3% | 96.8% | 94.5% | 57.94 |
| YOLOv8-DEE | 96.6% | 93.2% | 95.6% | 94.9% | 75.43 |
| MobileViT-YOLO | 87.6% | 88.4% | 87.3% | 87.9% | 61.56 |
| RT-DETR | 93.3% | 93.5% | 93.1% | 93.4% | 44.61 |
| YOLOv5 | 86.2% | 81.8% | 87.2% | 83.9% | 66.82 |
| YOLOv6 | 86.5% | 77.2% | 86.7% | 81.6% | 78.23 |
| YOLOv7 | 85.1% | 77.8% | 78.3% | 81.3% | 101.79 |
| YOLOv8 | 87.1% | 85.4% | 88.6% | 86.2% | 99.85 |
| YOLOv10 | 92.3% | 85.2% | 91.2% | 88.6% | 93.89 |
| YOLOv11 | 91.8% | 87.9% | 89.9% | 90.3% | 105.78 |
| YOLOv12 | 91.5% | 88.7% | 90.1% | 90.1% | 90.99 |
| Ours | 98.2% | 93.4% | 97.0% | 95.7% | 91.32 |
| Model | Precision | Recall | mAP@50 | F1 |
|---|---|---|---|---|
| HAT-YOLOv8 | 96.3% | 93.0% | 97.7% | 94.6% |
| YOLOv8-DEE | 95.4% | 94.8% | 93.5% | 95.1% |
| YOLO-BFRV | 96.7% | 95.4% | 96.2% | 96.0% |
| MobileViT-YOLO | 93.4% | 84.2% | 85.3% | 88.5% |
| RT-DETR | 97.2% | 96.6% | 98.5% | 96.9% |
| YOLOv5 | 92.3% | 76.3% | 76.4% | 83.5% |
| YOLOv8 | 93.3% | 93.5% | 93.1% | 93.4% |
| YOLOv10 | 95.5% | 95.4% | 95.6% | 95.4% |
| YOLOv11 | 94.3% | 90.0% | 87.7% | 92.1% |
| YOLOv12 | 94.8% | 97.1% | 90.3% | 95.9% |
| Ours | 97.5% | 97.5% | 99.0% | 97.5% |
| Group | AMBA | EASPP | BiFPN | Precision | Recall | mAP@50 | F1 |
|---|---|---|---|---|---|---|---|
| 1 | 92.3% | 85.2% | 91.2% | 88.6% | |||
| 2 | √ | 93.3% | 86.0% | 91.7% | 89.5% | ||
| 3 | √ | 93.8% | 85.7% | 91.7% | 89.6% | ||
| 4 | √ | 94.5% | 85.8% | 92.3% | 89.9% | ||
| 5 | √ | √ | 92.4% | 84.5% | 90.5% | 88.3% | |
| 6 | √ | √ | 94.7% | 85.4% | 90.7% | 89.8% | |
| 7 | √ | √ | 94.1% | 83.4% | 91.6% | 88.4% | |
| 8 (Ours) | √ | √ | √ | 98.2% | 93.4% | 97.0% | 95.7% |
| Group | α | β | γ | Precision | Recall | mAP@50 | F1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 0 | 0 | 88.7% | 79.5% | 87.2% | 83.8% |
| 2 | 0 | 1 | 0 | 85.8% | 83.5% | 88.5% | 84.6% |
| 3 | 0 | 0 | 1 | 88.2% | 79.6% | 88.1% | 83.7% |
| 4 | 1/2 | 1/2 | 0 | 90.8% | 82.9% | 90.1% | 86.7% |
| 5 | 1/2 | 0 | 1/2 | 91.6% | 80.0% | 89.7% | 85.4% |
| 6 | 0 | 1/2 | 1/2 | 90.5% | 82.3% | 89.8% | 86.2% |
| 7 | 1/3 | 1/3 | 1/3 | 94.1% | 84.3% | 91.5% | 88.9% |
| 8 (Ours) | Adaptive | Adaptive | Adaptive | 98.2% | 93.4% | 97.0% | 95.7% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Deng, C.; Wu, Y.; Wu, Z.; Zhou, W.; Zhang, Y.; Sun, X.; Wang, S. YOLO-AEB: PCB Surface Defect Detection Based on Adaptive Multi-Branch Attention and Efficient Atrous Spatial Pyramid Pooling. Computers 2025, 14, 543. https://doi.org/10.3390/computers14120543
Deng C, Wu Y, Wu Z, Zhou W, Zhang Y, Sun X, Wang S. YOLO-AEB: PCB Surface Defect Detection Based on Adaptive Multi-Branch Attention and Efficient Atrous Spatial Pyramid Pooling. Computers. 2025; 14(12):543. https://doi.org/10.3390/computers14120543
Chicago/Turabian StyleDeng, Chengzhi, Yingbo Wu, Zhaoming Wu, Weiwei Zhou, You Zhang, Xiaowei Sun, and Shengqian Wang. 2025. "YOLO-AEB: PCB Surface Defect Detection Based on Adaptive Multi-Branch Attention and Efficient Atrous Spatial Pyramid Pooling" Computers 14, no. 12: 543. https://doi.org/10.3390/computers14120543
APA StyleDeng, C., Wu, Y., Wu, Z., Zhou, W., Zhang, Y., Sun, X., & Wang, S. (2025). YOLO-AEB: PCB Surface Defect Detection Based on Adaptive Multi-Branch Attention and Efficient Atrous Spatial Pyramid Pooling. Computers, 14(12), 543. https://doi.org/10.3390/computers14120543

