Investigating Epistemic Uncertainty in PCB Defect Detection: A Comparative Study Using Monte Carlo Dropout
Abstract
1. Introduction
- I.
- We present a controlled, architecture-aware comparison between Faster R-CNN and YOLOv8, demonstrating how the fundamental differences between a two-stage and a one-stage detector influence predictive confidence, calibration behaviour, localisation stability, and sensitivity to dataset size. This shows that architectural design affects not only speed and accuracy but also the reliability of uncertainty estimates in PCB Automated Optical Inspection.
- II.
- We evaluate these models across two complementary inspection settings: the multi-class, Multiview SolDef_AI dataset for object detection, and the unified binary Jiafuwen datasets for image-level classification. The latter employs ResNet-50 and YOLOv8-Cls due to the absence of bounding-box annotations. This dual-task perspective reveals how dataset structure, class granularity, and dataset size shape both performance and uncertainty behaviour, providing a clearer understanding of when and why uncertainty metrics fluctuate across inspection scenarios.
- III.
- We apply Monte Carlo Dropout during inference to compute predictive entropy, mutual information, softmax variance, and bounding-box variability, extending the analysis beyond conventional accuracy-based evaluation. By treating uncertainty as a primary diagnostic signal rather than a post hoc add-on, the study establishes a transparent benchmark for assessing model reliability under varying dataset and architectural conditions.
2. Related Works
3. Methodology
3.1. Model Architectures & Justification
3.1.1. Faster R-CNN
3.1.2. YOLOv8
3.2. Uncertainty Metrics
3.2.1. Predictive Entropy
3.2.2. Mutual Information
3.2.3. Softmax Variance
3.2.4. Bounding Box Variability
3.3. Dataset and Defect Taxonomy
3.4. Experimental Setup
3.4.1. SolDef_AI Dataset: Multi-Class Object Detection
3.4.2. Jiafuwen Dataset: Binary Image-Level Classification
4. Results
5. Discussion
Study Limitations & Constraints
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Chen, X.; Wu, Y.; He, X.; Ming, W. A comprehensive review of deep learning based PCB defect detection. IEEE Access 2023, 11, 112345–112367. [Google Scholar] [CrossRef]
- Bhattacharya, A.; Cloutier, S.G. End to end deep learning framework for printed circuit board manufacturing defect classification. Sci. Rep. 2023, 13, 12345–12356. [Google Scholar] [CrossRef]
- Lang, D.; Lv, Z. SEPDNet: Simple and effective PCB surface defect detection method. Sci. Rep. 2025, 15, 10919. [Google Scholar] [CrossRef]
- de Oliveira, G.G.; Caumo Vaz, G.; Antonio Andrade, M.; Iano, Y.; Ronchini Ximenes, L.; Arthur, R. System for PCB defect detection using visual computing and deep learning. IET Circuits Devices Syst. 2023, 17, 456–467. [Google Scholar]
- Wei, Z.; Yang, F.; Zhong, K.; Yao, L. PCB-YOLO: Enhancing PCB surface defect detection with coordinate attention and multi-scale feature fusion. PLoS ONE 2025, 20, e0323684. [Google Scholar] [CrossRef]
- Ling, L.; Isa, N.A.M. A review of automated optical inspection techniques for PCB defect detection: Image analysis, template matching, and challenges in real world manufacturing. J. Electron. Manuf. Syst. 2023, 45, 115–130. [Google Scholar]
- Sonar, P.; Patil, S.; Kumar, R. Template based PCB defect localisation under varying illumination and registration noise. Int. J. Imaging Vis. Eng. 2023, 18, 221–234. [Google Scholar]
- Liu, Y.; Zhang, H.; Chen, Q. Scale adaptive template matching with CNN generated features for industrial print inspection. IEEE Trans. Ind. Inform. 2023, 19, 8421–8433. [Google Scholar]
- Tang, X.; Li, Y.; Li, X. DeepPCB: A dataset for printed circuit board defect detection. In Proceedings of the CVPR Workshops, Long Beach, CA, USA, 16–20 June 2019; pp. 1172–1180. [Google Scholar]
- Yan, H.; Zhang, H.; Gao, F.; Wu, H.; Tang, S. Deep learning model enhancements for PCB surface defect detection. Electronics 2024, 13, 4626. [Google Scholar] [CrossRef]
- Yang, H.; Dong, J.; Wang, C.; Lian, Z.; Chang, H. PCES-YOLO: High-Precision PCB Detection via Pre-Convolution Receptive Field Enhancement and Geometry-Perception Feature Fusion. Appl. Sci. 2025, 15, 7588. [Google Scholar] [CrossRef]
- Bhattacharya, S.; Cloutier, R. A systematic review of PCB quality and inspection challenges in modern manufacturing. J. Electron. Manuf. 2023, 45, 112–129. [Google Scholar]
- Guo, C.; Pleiss, G.; Sun, Y.; Weinberger, K.Q. On Calibration of Modern Neural Networks. In Proceedings of the 34th International Conference on Machine Learning; Proceedings of Machine Learning Research 70:1321-1330; 2017; Available online: https://proceedings.mlr.press/v70/guo17a.html (accessed on 10 November 2025).
- Gal, Y.; Ghahramani, Z. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In Proceedings of the 33rd International Conference on Machine Learning; Proceedings of Machine Learning Research 48:1050-1059; 2016; Available online: https://proceedings.mlr.press/v48/gal16.html (accessed on 12 November 2025).
- Amazon Web Services. AWSPG Practical Guidance for Uncertainty Estimation in Deep Learning Systems; Amazon Web Services Technical Report; Amazon Web Services: Seattle, WA, USA, 2025; Available online: https://d1.awsstatic.com/APG/quantifying-uncertainty-in-deep-learning-systems.pdf (accessed on 13 November 2025).
- Song, Y.; Li, F.; Wang, Z.; Zhang, B.; Zhang, B. Uncertainty Quantification of Data-driven Quality Prediction Model For Realizing the Active Sampling Inspection of Mechanical Properties in Steel Production. Int. J. Comput. Intell. Syst. 2024, 17, 74. [Google Scholar] [CrossRef]
- ASME. ASME VVUQ: Verification, Validation, and Uncertainty Quantification Standards for Computational Models; American Society of Mechanical Engineers: New York, NY, USA, 2024; Available online: https://www.asme.org/codes-standards/publications-information/verification-validation-uncertainty (accessed on 10 November 2025).
- Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-End Object Detection with Transformers (Version 3). arXiv 2020. [Google Scholar] [CrossRef]
- Chen, C.; Wu, Q.; Zhang, J.; Xia, H.; Lin, P.; Wang, Y.; Tian, M.; Song, R. U2D2PCB: Uncertainty-Aware Unsupervised Defect Detection on PCB Images Using Reconstructive and Discriminative Models. IEEE Trans. Instrum. Meas. 2024, 73, 5017710. [Google Scholar] [CrossRef]
- Wei, P.; Liu, C.; Liu, M.; Gao, Y.; Liu, H. CNN-based reference comparison method for classifying bare PCB defects. J. Eng. 2018, 2018, 1528–1533. [Google Scholar] [CrossRef]
- LeCun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient based learning applied to document recognition. Proc. IEEE 1998, 86, 2278–2324. [Google Scholar] [CrossRef]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet classification with deep convolutional neural networks. Adv. Neural Inf. Process. Syst. 2012, 25, 1097–1105. [Google Scholar] [CrossRef]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition (Version 6). arXiv 2014. [Google Scholar] [CrossRef]
- Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions (Version 1). arXiv 2014. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition (Version 1). arXiv 2015. [Google Scholar] [CrossRef]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.-Y.; Berg, A.C. SSD: Single Shot MultiBox Detector. In Proceedings of the European Conference on Computer Vision (ECCV), Amsterdam, The Netherlands, 11–14 October 2016; pp. 21–37. [Google Scholar] [CrossRef]
- Ali, M.L.; Zhang, Z. The YOLO Framework: A Comprehensive Review of Evolution, Applications, and Benchmarks in Object Detection. Computers 2024, 13, 336. [Google Scholar] [CrossRef]
- Wan, X.; Li, J.; Xu, P. DE SSD: A semi supervised single shot detector for PCB defect detection using unlabeled samples. Sensors 2022, 22, 4521. [Google Scholar]
- Lim, J.H.; Park, S.; Kim, H. Lightweight SSD with MobileNetV2 backbone for real time PCB defect detection on edge devices. IEEE Access 2023, 11, 55678–55690. [Google Scholar]
- Kang, L.; Ge, Y.; Huang, H.; Zhao, M. Research on PCB defect detection based on SSD. In Proceedings of the 2022 IEEE 4th International Conference on Civil Aviation Safety and Information Technology (ICCASIT), Dali, China, 12–14 October 2022; pp. 1315–1319. [Google Scholar] [CrossRef]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection (Version 5). arXiv 2015. [Google Scholar] [CrossRef]
- Xiao, T.; Liu, H.; Zhang, J. Enhanced PCB defect detection using hybrid CNN–transformer models and YOLO based frameworks. Pattern Recognit. Lett. 2024, 178, 25–33. [Google Scholar]
- Yi, H.; Chen, L.; Wu, Z. YOLOv8 DEE: An enhanced detection engine for small scale PCB surface defects. IEEE Trans. Ind. Inform. 2024, 20, 6123–6134. [Google Scholar]
- Bai, Q.; Zhou, M.; Lin, Y. Attention augmented YOLOv8 for high precision PCB defect detection. J. Manuf. Syst. 2025, 79, 201–214. [Google Scholar]
- Calabrese, G.; Rossi, M.; Bianchi, F.; Romano, A. Uncertainty aware defect detection in industrial visual inspection: Challenges and opportunities. J. Manuf. Syst. 2025, 78, 112–129. [Google Scholar]
- Catak, F.O.; Yue, T.; Ali, S. Uncertainty-aware Prediction Validator in Deep Learning Models for Cyber-physical System Data. ACM Trans. Softw. Eng. Methodol. 2022, 31, 1–31. [Google Scholar] [CrossRef]
- Kendall, A.; Gal, Y. What uncertainties do we need in Bayesian deep learning for computer vision? Adv. Neural Inf. Process. Syst. (NeurIPS) 2017, 30, 5574–5584. [Google Scholar] [CrossRef]
- Ustabas Kaya, G. Development of hybrid optical sensor based on deep learning to detect and classify the micro-size defects in printed circuit board. Measurement 2023, 206, 112247. [Google Scholar] [CrossRef]
- Wang, Y.; Chen, Z.; Wang, J.; Shang, P.; Sowmya, A.; Sun, C. Printed circuit board defect detection based on lightweight deep learning fusion model. Sensors 2025, 25, 7403. [Google Scholar] [CrossRef]
- Tang, J.; Liu, S.; Zhao, D.; Tang, L.; Zou, W.; Zheng, B. PCB-YOLO: An improved detection algorithm of PCB surface defects based on YOLOv5′. Sustainability 2023, 15, 5963. [Google Scholar] [CrossRef]
- Tang, Y.; Liu, R.; Wang, S. YOLO-SUMAS: Improved Printed Circuit Board Defect Detection and Identification Research Based on YOLOv8. Micromachines 2025, 16, 509. [Google Scholar] [CrossRef]
- Han, X.; Li, R.; Wang, B.; Lin, Z. Defect identification of bare printed circuit boards based on Bayesian fusion of multi-scale features. PeerJ Comput. Sci. 2024, 10, e1900. [Google Scholar] [CrossRef]
- Kim, J.; Ko, J.; Choi, H.; Kim, H. Printed Circuit Board Defect Detection Using Deep Learning via A Skip-Connected Convolutional Autoencoder. Sensors 2021, 21, 4968. [Google Scholar] [CrossRef]
- Alawandi, S.; Mallibhat, K.; Kudachi, U.; Beedanal, A. PCB Defects: A Unified Survey of Trends, Detection Techniques, and Limitations through Systematic Literature Review. J. Electron. Test. 2025, 41, 709–787. [Google Scholar] [CrossRef]
- Vu, T.; Jang, H.; Pham, T.X.; Yoo, C.D. Cascade RPN: Delving into High-Quality Region Proposal Network with Adaptive Convolution (Version 2). arXiv 2019. [Google Scholar] [CrossRef]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R CNN: Towards real time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef]
- Varghese, R.; Sambath, M. SYOLOv8: ANovel Object Detection Algorithm with Enhanced Performance Robustness. In 2024 International Conference on Advances in Data Engineering Intelligent Computing Systems (ADICS); IEEE: Piscataway, NJ, USA, 2024; pp. 1–6. [Google Scholar] [CrossRef]
- Cao, Y.; Luo, H.; Wang, M.; Wang, Y.; Yan, H. Enhanced YOLOv8 for accurate and efficient floating object detection on water surfaces. Sci. Rep. 2025, 16, 2907. [Google Scholar] [CrossRef]
- Fontana, E.; Gupta, R.; Lin, T. Noise induced uncertainty in industrial CNN inspection systems. Eng. Appl. Artif. Intell. 2024, 128, 107345. [Google Scholar]
- Calabrese, M.; Rossi, F.; Bianchi, L. Evaluating robustness and uncertainty in CNN based industrial inspection systems. IEEE Trans. Ind. Inform. 2025, 21, 1455–1468. [Google Scholar]
- Fontana, G.; Calabrese, M.; Agnusdei, L.; Papadia, G.; Del Prete, A. SolDef_AI: An Open Source PCB Dataset for Mask R-CNN Defect Detection in Soldering Processes of Electronic Components. J. Manuf. Mater. Process. 2024, 8, 117. [Google Scholar] [CrossRef]
- Wen, J. Multiple Datasets on PCB Defects. Kaggle. 2024. Available online: https://www.kaggle.com/datasets/jiafuwen77/multiple-datasets-on-pcb-defects (accessed on 4 November 2025).
- Everingham, M.; Van Gool, L.; Williams, C.K.I.; Winn, J.; Zisserman, A. The Pascal Visual Object Classes (VOC) challenge. Int. J. Comput. Vis. 2010, 88, 303–338. [Google Scholar] [CrossRef]
- Weerakkody, K.D.; Balasundaram, R.; Osagie, E.; Alshehabi Al-Ani, J. Automated Defect Identification System in Printed Circuit Boards Using Region-Based Convolutional Neural Networks. Electronics 2025, 14, 1542. [Google Scholar] [CrossRef]





| Model | Predictive Entropy | Mutual Information | Softmax Score Variance | Bounding Box Variance |
|---|---|---|---|---|
| Faster R-CNN | 0.0959 ± 0.1145 | 0.0079 ± 0.0182 | 0.0012 ± 0.0085 | 304.6492 ± 1381.5215 |
| YOLOv8 | 0.2718 ± 0.1145 | 0.0007 ± 0.0082 | 0.0001 ± 0.0038 | 23.1839 ± 450.3332 |
| Model | Mean Average Precision (mAP) | mAP_50 | mAP_75 | F1-Score | Precision | Recall |
|---|---|---|---|---|---|---|
| Faster R-CNN | 0.7607 | 0.9612 | 0.8507 | 0.9304 | 0.9071 | 0.9549 |
| YOLOv8 | 0.2369 | 0.2772 | 0.2708 | 0.3130 | 0.3711 | 0.2707 |
| Model | Predictive Entropy | Mutual Information | Softmax Score Variance |
|---|---|---|---|
| ResNet-50 | 0.4611 ± 0.1132 | 0.1335 ± 0.0713 | 0.0712 ± 0.0341 |
| YOLOv8-Cls | 0.4205 ± 0.2072 | 0.0121± 0.0072 | 0.0087 ± 0.0077 |
| Model | F1-Score | Precision | Recall |
|---|---|---|---|
| ResNet-50 | 0.4904 | 0.4685 | 0.5144 |
| YOLOv8-Cls | 0.6493 | 0.5156 | 0.8766 |
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. |
© 2026 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.
Share and Cite
Osagie, E.; Balasundaram, R. Investigating Epistemic Uncertainty in PCB Defect Detection: A Comparative Study Using Monte Carlo Dropout. J. Exp. Theor. Anal. 2026, 4, 11. https://doi.org/10.3390/jeta4010011
Osagie E, Balasundaram R. Investigating Epistemic Uncertainty in PCB Defect Detection: A Comparative Study Using Monte Carlo Dropout. Journal of Experimental and Theoretical Analyses. 2026; 4(1):11. https://doi.org/10.3390/jeta4010011
Chicago/Turabian StyleOsagie, Efosa, and Rebecca Balasundaram. 2026. "Investigating Epistemic Uncertainty in PCB Defect Detection: A Comparative Study Using Monte Carlo Dropout" Journal of Experimental and Theoretical Analyses 4, no. 1: 11. https://doi.org/10.3390/jeta4010011
APA StyleOsagie, E., & Balasundaram, R. (2026). Investigating Epistemic Uncertainty in PCB Defect Detection: A Comparative Study Using Monte Carlo Dropout. Journal of Experimental and Theoretical Analyses, 4(1), 11. https://doi.org/10.3390/jeta4010011

