🏆
Global Peer-Reviewed Platform
Serving Researchers Since 2012

AI-Powered PCB Defect Detection System with Explainable AI, Real-Time Feedback, and Severity Analysis

DOI : 10.17577/IJERTV15IS041934
Download Full-Text PDF Cite this Publication

Text Only Version

AI-Powered PCB Defect Detection System with Explainable AI, Real-Time Feedback, and Severity Analysis

Atharv Atul

Deshpande Instrumentation and Control, Vishwakarma Institute of Technology, Pune,India .

Jay Dattatray Deshmukh

Instrumentation and Control, Vishwakarma Institute of Technology, Pune,India.

Prof. Jayant Kulkarni

Instrumentation and Control, Vishwakarma Institute of Technology, Pune,India.

Vinayak Dhage

Instrumentation and Control, Vishwakarma Institute of Technology Pune,India.

Abstract – Printed circuit board defects significantly impact the reliability and cost of electronic products. Traditional manual inspection methods are time- consuming, error prone and unsuitable for modern high speed manufacturing environments. This paper presents a smart AI based PCB defect detection system that integrates deep learning based classification, real time feedback. defect severity analysis, and explainable artificial intelligence i.e. XAI. The proposed system employs a convolutional neural network with transfer learning (EfficientNetB0) to detect and classify common PCB defects such as missing hole, mouse bite, open circuit, short, spur, and spurious copper. Severity levels are estimated based on defect size, location and class specific risk enabling prioritized decision making in manufacturing lines. To improve trust and interpretability gradient weighted class activation mapping (Grand CAM) is used to visualize regions influencing model prediction. Experimental results demonstrate and accuracy exceeding 95% on benchmark PCB datasets, highlighting the effectiveness and practicality of the proposed approach for industrial deployment.

Keywords PCB defect detection, deep learning, EfficientNet, severity analysis, explainable AI, GradCAM, computer vision.

  1. INTRODUCTION

    Printed circuit boards form the backbone of modern electronics systems. Even minor difference in PCB can lead to system failure, reduce lifespan, and increased maintenance costs. Conventional inspection techniques such as manual visual inspection and rule based Automated Optical Inspection (AOI) systems struggle with scalability, adaptability, and accuracy when faced with complex defect patterns. Recent advancements in deep learning and computer vision have enabled intelligent inspection systems capable of learning discriminative features directly from images. However many existing solutions focus solely on defect classification accuracy while neglecting interpretability and defect severity assessment both of which are critical for real-world manufacturing adoption. This paper proposes a smart

    AI best PCB defect detection system that goes beyond classification by incorporating real time defeat detection and feedback, quantitative severity analysis for decision support and explainable AI techniques to improve transparency and trust.

  2. RELATED WORK

    Early PCB inspection systems relied on image processing techniques such as edge detection, template matching, and morphological operation. Why effective for simple patterns these methods are sensitive to noise and variations in lighting and design.

    With the rise of deep learning, convolutional neural networks (CNNs) have been widely applied for PCB defect detection. Architecture such as VGG, ResNet, and YOLO-best detectors have been promising results. However, most studies focus on detection accuracy alone. Limited work addresses defect severity quantification and explainability, which are crucial for industrial decision making.

    Explainable AI methods such as Grand-CAM have recently gained attention for visualizing CNN decision regions, but their application to PCB inspection remains relatively unexplored. This work bridges that gap by integrated XAI and severity analysis into a unified PCB inspection framework.

  3. PROPOSED SYSTEM ARCHITECTURE

    The proposed system architecture consists of four major modules:

    1. Data Acquisition and Preprocessing

      High resolution PCB images are collected and organised into defect specific categories. Preprocessing steps include resizing, normalization, noise reduction, and data augmentation (rotation, flipping, zooming) to improve model generalization.

    2. Deep LearningBased Defect Detection

      An EfficientNetB0 model pre-trained on ImagiNet is fine-tuned for PCB defect classification. Transfer learning enables faster convergence and improved accuracy with limited training data. Class weighting is applied to handle data set imbalance.

    3. Severity Analysis Module

      Defect severity is computer using a weighted scoring mechanism based on: Defect type (critical vs. non-critical),

      -Defect area and intensity, and

      -location relevance on the PCB.

      Severity levels are categorized as low, medium or high enabling manufacturers to prioritize repairs or rejections.

    4. Explainable AI Module

    To enhance transparency, Grad-CAM is employed to generate heat maps highlighting image regions that influence the model’s predictions. This allows engineers to visually verify whether the model focuses on meaningful defect areas.

  4. METHODOLOGY

    1. Dataset Description

      1. The dataset they used has images of printed circuit boards with labels for different defects. There are six main types, like missing holes or mouse bites, open circuits, shorts, spurs, and that spurious copper thing. I think its divided into training, validation, and testing parts so the model can learn properly without just memorizing everything. That way, you tune the settings and check how it really does on new stuff.

      2. For the model, they picked EfficientNetB0 because it gets good results without needing a ton of computer power. Sounds efficient, right. They trained it with this categorical cross-entropy loss, and Adam optimizer to make it converge quicker. Oh, and they added learning rate scheduling plus early stopping to avoid overfitting, I guess that helps it work better on real examples.For papers with less than six authors: To change the default, adjust the template as follows.

    2. Model Training

      Because of its high accuracy and computational efficiency, the EfficientNetB0 convolutional neural network is used for multiclass PCB defect classification. To guarantee steady and quick convergence, the model is trained using the Adam optimizer and categorical cross-entropy as the loss function. Early stopping is used to avoid overfitting and maintain the top-performing model based on validation performance, while learning rate scheduling is used to adaptively lower the learning rate in order to increase training robustness.

    3. Figures and Tables

    1. Positioning Figures and Tables: Place figures and tables at the top and bottom of columns. Avoid placing them in the middle of columns. Large figures and tables may span across both columns. Figure captions should be below the figures; table heads should appear above the tables. Insert figures and tables after they are cited in the text. Use the abbreviation Fig. 1, even at the beginning of a sentence.

      TABLE I. TABLE TYPE STYLES

      Table Head

      Table Column Head

      Table column subhead/p>

      Subhead

      Subhead

      copy

      More table copya

      1. Sample of a Table footnote. (Table footnote)

    Fig. 1. Example of a figure caption. (figure caption)

    Figure Labels: Use 8 point Times New Roman for Figure labels. Use words rather than symbols or abbreviations when writing Figure axis labels to avoid confusing the reader. As an example, write the quantity Magnetization, or Magnetization, M, not just M. If including units in the label, present them within parentheses. Do not label axes only with units. In the example, write Magnetization (A/m) or Magnetization {A[m(1)]}, not just A/m. Do not label axes with a ratio of quantities and units. For example, write Temperature (K), not Temperature/K.

  5. RESULTS AND DISCUSSION OF THE EXPERIMENT

    1. Total Performance in Classification

      The effectiveness of the suggested PCB defect detection system in identifying various defect types is demonstrated by its overall classification accuracy, which surpasses 95%. The EfficientNetB0-based model has better generalization and feature extraction capabilities than traditional CNN architectures, which leads to higher prediction accuracy across all test samples.

    2. Performance Metrics for Evaluation

      For each defect class, precision, recall, and F1-score metrics are used to further assess the model’s performance. Strong recall scores validate the model’s capacity to accurately identify defective regions, while high precision values signify a low false-positive rate. The robustness and dependability of the suggested method for multiclass PCB defect classification are confirmed by the balanced F1-scores for each class.

    3. Evaluation of PCB Defect Severity

      To evaluate the criticality of defects found, a severity analysis is carried out. Because they have a major effect on circuit functionality, defects like open circuits and short circuits are given higher severity ratings. The outcomes show that the system efficiently ranks critical flaws, facilitating quicker remedial actions and better quality control in production settings.

    4. Grad-CAM Model Interpretability

    The interpretability of the trained model is examined using Grad-CAM visualizations. The PCB images’ actual defect locations strongly match the highlighted activation regions. This alignment validates the decision-making process’s dependability and transparency by confirming that the model concentrates on significant defect features rather than pointless background areas.

  6. ADVANTAGES AND INDUSTRIAL IMPACT

    • Very accurate and strong defect detection

      The suggested system shows that it can accurately classify and consistently perform well across all types of PCB defects. Its robustness against variations in defect size and appearance makes it suitable for reliable quality inspection in real-world manufacturing environments.

    • Real-Time Inspection for Manufacturing Lines The integration of the trained model with a real-time inference pipeline enables fast and continuous PCB inspection. This capability allows seamless deployment on production lines, reducing inspection time and minimizing human intervention.

    • Severity-Based Decision Support

      The system incorporates a severity analysis mechanism that prioritizes critical defects such as open circuits and shorts. This feature supports informed decision-making by enabling operators to focus on high-impact defects, thereby improving maintenance efficiency and reducing production losses.

    • Enhanced Trust Through Explainable AI By utilizing Grad-CAMbased visual explanations, the system provides transparency in its predictions. Highlighting defect-specific regions improves user trust and acceptance, which is essential for adopting AI-based inspection systems in industrial settings.

    • Scalability and Industrial Integration

    The model can be extended to support additional defect classes and higher-resolution images, ensuring adaptability to future manufacturing requirements.

    The proposed system is suitable for academic research, industrial simulation, and real-world deployment in smart manufacturing environments, offering a reliable, scalable, and intelligent solution for automated PCB defect inspection.

  7. METRICS FOR PERFORMANCE ASSESSMENT

    Several quantitative performance metrics are used in order to thoroughly assess the efficacy of the suggested PCB defect detection system. Beyond mere accuracy, these metrics offer a more profound understanding.

    1. Precision

      The proportion of correctly classified PCB images to all test samples is known as accuracy.

      Accuracy is equal to (TP + TN) / (TP + TN + FP + FN), where TP, TN, FP, and FN stand for true positives, false positives, false negatives, and true negatives, respectively.

    2. F1-Score, Precision, and Recall

      While recall assesses the model’s capacity to identify all real flaws, precision gauges how accurately positive predictions are made. A harmonic mean of precision and recall is provided by the F1-score:

      TP / (TP + FP) = precision TP / (TP + FN) = Recall

      F1-score is equal to 2 × (precision × recall) / (precision + recall).

      In PCB inspection, where false negatives can result in serious system failures, these metrics are particularly crucial.

    3. Confusion Matrix Analysis

      A confusion matrix was used to visualize class-wise performance across the six defect categories. The results are as follows:

      would provide evidence of strong diagonal dominance and, therefore, reliable discrimination among visually similar defects.

      such as spur and spurious copper

  8. COMPARATIVE ANALYSIS

A comparative analysis is carried out to assess the performance of the proposed EfficientNetB0 architecture compared to existing conventional designs such as the convolutional neural network models VGG16 and ResNet-18, considering classification accuracy and the complexity of the models in terms of the number of trainable parameters.

Model

Accuracy (%)

Parameters

VGG16

89.4

138

ResNet-18

92.1

11.7

Proposed EfficientNetB0

95.6

5.3

From the results, it can be understood that the lowest accuracy of 89.4% is achieved by VGG16, which at the same time has the highest number of parameters at 138 million, thereby resulting in increased memory and computation. This shows that VGG16 is not appropriate for edge devices

The improved performance is also seen in the ResNet-18, which achieves 92.1% accuracy and also reduces the parameters by a significant margin to 11.7 million. The residual connection improves the features and the training stability. Nevertheless, the model requires moderate computational resources.

REFERENCES

The template will number citations consecutively within brackets [1]. The sentence punctuation follows the bracket [2]. Refer simply to the reference number, as in [3]do not use Ref. [3] or reference [3] except at the beginning of a sentence: Reference [3] was the first …

Number footnotes separately in superscripts. Place the actual footnote at the bottom of the column in which it was cited. Do not put footnotes in the abstract or reference list. Use letters for table footnote.

Unless there are six authors or more give all authors names; do not use et al.. Papers that have not been published, even if they have been submitted for publication, should be cited as unpublished [4]. Papers that have been accepted for publication should be cited as in press [5]. Capitalize only the first word in a paper title, except for proper nouns and element symbols.

For papers published in translation journals, please give the English citation first, followed by the original foreign-language citation [6].

  1. G. Eason, B. Noble, and I. N. Sneddon, On certain integrals of Lipschitz-Hankel type involving products of Bessel functions, Phil. Trans. Roy. Soc. London, vol. A247, pp. 529551, April 1955. (references)

  2. J. Clerk Maxwell, A Treatise on Electricity and Magnetism, 3rd ed., vol. 2. Oxford: Clarendon, 1892, pp.6873.

  3. I. S. Jacobs and C. P. Bean, Fine particles, thin films and exchange anisotropy, in Magnetism, vol. III, G. T. Rado and H. Suhl, Eds. New York: Academic, 1963, pp. 271350.

  4. K. Elissa, Title of paper if known, unpublished.

  5. R. Nicole, Title of paper with only first word capitalized, J. Name Stand. Abbrev., in press.

  6. Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, Electron spectroscopy studies on magneto-optical media and plastic substrate interface, IEEE

    Transl. J. Magn. Japan, vol. 2, pp. 740741, August 1987 [Digests 9th Annual Conf. Magnetics Japan, p. 301, 1982].

  7. M. Young, The Technical Writers Handbook. Mill Valley, CA: University Science, 1989.

  8. K. Eves and J. Valasek, Adaptive control for singularly perturbed systems examples, Code Ocean, Aug. 2023. [Online]. Available: https://codeocean.com/capsule/4989235/tree

  9. D. P. Kingma and M. Welling, Auto-encoding variational Bayes, 2013, arXiv:1312.6114. [Online]. Available:

    https://arxiv.org/abs/1312.6114

  10. S. Liu, Wi-Fi Energy Detection Testbed (12MTC), 2023, gitHub repository. [Online]. Available: https://github.com/liustone99/Wi-Fi-

    Energy-Detection-Testbed-12MTC

  11. Treatment episode data set: discharges (TEDS-D): concatenated, 2006 to 2009. U.S. Department of Health and Human Services, Substance Abuse and Mental Health Services Administration, Office

of Applied Studies, August, 2013, DOI:10.3886/ICPSR30122.v2