Back to Realizations
Software / Computer Vision (AI) Academic Project (AI)

PCB Defect Detection

Academic Context

This project was designed and developed as a practical assignment (TP) for the Artificial Intelligence course, specifically in the Computer Vision module. It applies state-of-the-art convolutional object detection models (YOLO11) to a concrete industrial engineering problem.

PCB Defect Detection
ttkbootstrap desktop GUI application for real-time PCB inspection.
01. Industrial Problem Statement

Why Automate PCB Inspection?

In the electronics manufacturing industry, visual inspection of raw printed circuit boards (PCBs) is traditionally manual or reliant on expensive optical systems. Human inspection is slow, fatigue-prone, and error-prone. A single undetected defect (such as a short circuit, broken trace, or missing hole) can cause component destruction during assembly or total hardware failure.

02. Rationale & Value

The Computer Vision Solution

I chose this topic to bridge electrical/electronic engineering with artificial intelligence. AI-driven defect detection (YOLO11) provides an automated, ultra-fast (real-time GPU inference), and affordable solution reaching 97.4% precision, ensuring circuit reliability before component assembly.

YOLO11 Model Performance

96.4%
Précision de Détection (mAP50)
97.0%
Précision Moyenne
92.5%
Rappel Moyen (Recall)
94.7%
F1-Score
42 min (Tesla T4 × 2)
Temps d’Entraînement

Detected PCB Defect Classes

Class 0
missing_hole
Missing drill hole
Class 1
mouse_bite
Irregular trace edge defect
Class 2
open_circuit
Broken copper trace
Class 3
short
Short circuit between traces
Class 4
spur
Copper protrusion
Class 5
spurious_copper
Unwanted excess copper

Gallery & Training Visualizations

Sample YOLO11 model detections showing bounding boxes, defect labels, and confidence scores.
Sample YOLO11 model detections showing bounding boxes, defect labels, and confidence scores.
Training loss curves and validation metrics over 100 epochs on Kaggle GPU Tesla T4.
Training loss curves and validation metrics over 100 epochs on Kaggle GPU Tesla T4.

How to Clone and Run the Project Locally

Copy and paste the commands below into your terminal to clone the repo and run the desktop testing app:

1. Clone GitHub repository & install dependencies
git clone https://github.com/alainpaluku/pcb-defect-detection.git
cd pcb-defect-detection
pip install -r requirements.txt
2. Place trained model and test images
# Placez votre fichier pcb_model.pt dans le dossier models/
# Placez vos images PCB de test dans le dossier images/
3. Run local desktop GUI app
python -m gui_test.app

GPU Training on Kaggle Notebooks

!pip install ultralytics -q
!wget -q https://github.com/alainpaluku/pcb-defect-detection/archive/main.zip
!unzip -q main.zip
!mv pcb-defect-detection-main pcb-defect-detector
%cd pcb-defect-detector
!python run_kaggle.py