PCBVisionNet: An Attention-Guided CNN Framework for Automated PCB Defect Classification with Explainable Localization
The rapid miniaturization and increasing complexity of Printed Circuit Boards (PCBs) have rendered traditional automated optical inspection (AOI) systems inadequate for high-precision defect detection. While deep learning approaches have shown promise, they often struggle to balance the need for high-resolution feature extraction with the computational efficiency required for real-time industrial deployment. Furthermore, the “black-box” nature of most convolutional neural networks (CNNs) limits their adoption in stringent quality assurance environments where interpretability is paramount. To address these challenges, this paper proposes PCBVisionNet, a novel, lightweight deep learning architecture specifically engineered for automated multi-class PCB defect classification. The framework integrates a Dual-Domain Attention Mechanism (DDAM) and a Multi-Scale Feature Extractor (MSFE) with residual learning to effectively capture both microscopic anomalies and complex structural defects, enabling robust image-level classification of PCB defect categories. We evaluate the proposed model on three publicly available datasets: DeepPCB, PKU-Market-PCB, and HRIPCB. Experimental results demonstrate that PCBVisionNet achieves superior classification performance with a mean Average Precision (mAP) of 99.4% across defect categories, outperforming state-of-the-art architectures such as ResNet50, EfficientNet-B0, and Vision Transformers, while requiring 45% fewer parameters and reducing inference time by 23 ms per image. The integration of Gradient-weighted Class Activation Mapping (Grad-CAM) provides post hoc visual explainability, highlighting image regions that influence the classification decision to support interpretability and root-cause analysis. The proposed framework offers a highly accurate, efficient, and interpretable solution for modern smart manufacturing systems.
Authors
- Fatema A. Albalooshi (ORCID: https://orcid.org/0000-0002-7147-0005)
- M.R. Qader (ORCID: https://orcid.org/0000-0002-3625-9722)
Institutions
- University of Bahrain (BH)
Publication Details
- Journal
- Computation
- Published
- 2026-07-28
- DOI
- https://doi.org/10.3390/computation14080168
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00