ComponentVision - Automated PC Assembly Inspection System
Computer vision inspection system for desktop PC assembly lines using 8 benchmarked YOLOv8 models, ATX spatial anchor validation, and a Streamlit inspection web app, developed for the Artificial Intelligence course.
Automating industrial quality inspection with Computer Vision.
Industrial desktop PC assembly requires rigorous inspection to ensure all essential components are correctly installed before shipping. ComponentVision simulates a real-world manufacturing inspection system by analyzing internal PC images, detecting key components, and verifying spatial layout.
Built for the Artificial Intelligence course at Politécnico do Porto, the project trained and benchmarked 8 YOLOv8 model variants (nano, small, medium) across cloud (Roboflow) and multi-GPU local environments (Kaggle 2x Tesla T4), reaching 93.4% mAP@0.5. It includes a custom spatial validation engine (core/spatial.py) and a full Streamlit inspection app with multi-model comparison.

Streamlit inspection app showing real-time component detection, coverage bar, and spatial checklist
The Problem & Key Challenges
Manual inspection of desktop PC assemblies on high-volume production lines is slow, expensive, and prone to human oversight. ComponentVision addresses this by automating presence verification for 4 critical component classes: Motherboard, GPU, RAM, and CPU Cooler (inferring CPU presence).
Presence detection alone is insufficient: components can be placed incorrectly or obscured. The platform introduces a geometric spatial validation layer (core/spatial.py) projecting ATX anchor coordinates to detect missing (red) or misplaced (amber) components.
- Constructing a balanced 238-image dataset (926 annotations) from smartphone photos of 3 PC builds and PCPartPicker builds
- Benchmarking 8 YOLOv8 model variants across Roboflow (A, B, C) and Kaggle 2x Tesla T4 GPUs (D, E, F, G, H)
- Handling extreme intra-class visual variance and RAM module occlusion caused by internal power cabling
- Implementing 2D spatial coordinate projection (core/spatial.py) from bounding box anchors
- Building an interactive Streamlit inspection portal with live camera feed, side-by-side model comparison, and JSON export
Architecture & Technical Decisions
End-to-end computer vision pipeline combining multi-GPU PyTorch training, Roboflow/Kaggle dataset augmentation, custom spatial geometry validation, and a Streamlit inspection web interface.
- Extensive 8-model benchmark isolates architecture size (nano vs small vs medium) and dataset homogeneity impact
- Dedicated spatial module (core/spatial.py) decoupled from object detection model for geometric ATX layout verification
- Sub-3ms local CPU inference latency enables real-time edge deployment without cloud dependency
- Streamlit web portal allows operators to run side-by-side model comparisons and export verified inspection certificates
Tech Stack & Infrastructure
Project Diagrams & Interfaces

Streamlit inspection app showing real-time component detection, coverage bar, and spatial checklist

AP@0.5 benchmark comparison across all 8 trained YOLOv8 models for Motherboard, GPU, RAM, and CPU Cooler

Streamlit side-by-side multi-model comparison interface

Spatial validation engine (core/spatial.py) projecting missing components in red bounding boxes

Successful multi-component detection sample with high confidence scores

Failure mode analysis: RAM occlusion by internal power cabling and atypical CPU Cooler form factor

Training and validation loss curves for Model A (YOLOv8n, 307 epochs, 93.4% mAP@0.5)