An Explainable AI-Based Computer Vision Framework for Printed Circuit Board Defect Detection Using YOLOv4

An Explainable AI-Based Computer Vision Framework for Printed Circuit Board Defect Detection Using YOLOv4

Authors

  • Hamed B. FOLORUNSHO
  • Ukoh J. SAMUEL
  • Abayomi I.O. YUSSUFF
  • Olatunde A. OGUNDEJI
  • Ayangbenjo H. ADEYEYE

Keywords:

Printed Circuit Boards, PCB defect detection, YOLOv4, computer vision, explainable artificial intelligence, automated optical inspection, deep learning.

Abstract

Printed Circuit Boards (PCBs) are critical components in modern electronic systems, where manufacturing defects can significantly compromise device reliability, safety, and operational performance. Conventional inspection techniques, including manual inspection and traditional Automated Optical Inspection (AOI), are often limited by subjectivity, high operational cost, and reduced scalability. This study proposes a lightweight and explainable Artificial Intelligence (AI)-based computer vision framework for automated PCB defect detection using a YOLOv4 object detection model integrated with multimodal explainable Artificial Intelligence (AI). A publicly available annotated PCB dataset sourced from Roboflow Universe was utilized for model training and evaluation, with data augmentation techniques including rotation, brightness adjustment, cropping, flipping, and noise injection applied to improve model robustness. The trained YOLOv4 model achieved a precision of 91.4%, recall of 87.8%, and mAP@0.5 of 89.2% with an average inference time of approximately 80 ms per image. To improve interpretability and usability, Gemini AI was integrated to generate natural-language explanations, defect summaries, and repair-oriented guidance based on detected anomalies. The complete framework was deployed as a responsive web-based application using Next.js, TailwindCSS, Prisma ORM, and PostgreSQL, supporting both single-image and batch-image inspection workflows. Experimental results demonstrate that the proposed system provides accurate, fast, and interpretable PCB defect inspection while maintaining accessibility for small-scale manufacturing, educational, and research environments. The study highlights the potential of integrating deep learning and explainable AI for scalable and cost-effective intelligent inspection systems in modern electronics manufacturing.

Published

06-09-2026

How to Cite

Hamed B. FOLORUNSHO, Ukoh J. SAMUEL, Abayomi I.O. YUSSUFF, Olatunde A. OGUNDEJI, & Ayangbenjo H. ADEYEYE. (2026). An Explainable AI-Based Computer Vision Framework for Printed Circuit Board Defect Detection Using YOLOv4. UNIABUJA Journal of Engineering and Technology (UJET), 3(2), 365–374. Retrieved from https://ujet.uniabuja.edu.ng/index.php/ujet/article/view/192

Issue

Section

Articles

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.

Loading...