CircuitGuard is an AI-powered defect detection system designed to identify faults in Printed Circuit Boards (PCBs) with high accuracy.
It leverages YOLOv8 deep learning models to automate inspection, reduce manual effort, and ensure quality assurance in electronics manufacturing.
The project evolved through two major phases:
- 🚀 Streamlit Prototype – A rapid proof-of-concept interface for quick experimentation and validation.
- 🌐 Flask Web Application – A production-ready, full-stack solution with database integration, analytics dashboards, and report generation.
This project was developed as a capstone deliverable during the Infosys Springboard Internship (8 weeks).
It represents the practical application of:
- Deep Learning (YOLOv8, Transfer Learning)
- Computer Vision (Bounding box detection, confidence scoring)
- Full-Stack Development (Flask, SQLAlchemy, Jinja2)
- Data Engineering (Dataset preparation, XML-to-YOLO conversion)
CircuitGuard follows a Model-View-Controller (MVC) architecture with Flask Blueprints for modularity.
Each component is designed for scalability, maintainability, and clarity.
PCB_DEFECT_DETECTOR/
├── models/
│ └── model_loader.py # Loads YOLOv8 model once at startup for efficient inference.
├── routes/
│ ├── dashboard.py # Handles homepage logic and navigation.
│ ├── inspection.py # Manages image uploads, runs inference, and displays results.
│ ├── metrices.py # Fetches SQL data to visualize defect statistics.
│ └── reports.py # Generates downloadable PDF/CSV inspection reports.
├── services/
│ ├── analytics.py # SQLAlchemy integration for scan history and defect analytics.
│ ├── inference.py # Core AI worker: preprocessing, YOLOv8 prediction, bounding box rendering.
│ └── reports.py # Formats inspection data into user-friendly reports.
├── static/
│ ├── css/style.css # Custom styling for UI.
│ ├── js/main.js # Frontend logic for previews and async API calls.
│ ├── images/background.jpg # UI assets.
│ ├── reports_storage/ # Temporary storage for generated reports.
│ ├── results/ # Processed images with bounding boxes.
│ └── uploads/ # Raw user-uploaded images.
├── templates/
│ ├── base.html # Master layout (navbar, footer).
│ ├── dashboard.html # Landing page.
│ ├── inspection.html # Upload interface for defect detection.
│ ├── metrices.html # Analytics dashboard with charts.
│ └── reports.html # Report listing and download page.
├── pcb_yolo_model_v1.pt # Trained YOLOv8 weights.
├── app.py # Entry point: initializes Flask app, registers Blueprints, configures DB.
├── config.py # Centralized settings (paths, DB URLs, secrets).
├── requirements.txt # Dependencies list.
└── streamlit.py # Legacy prototype for rapid testing.