YOLOv5 + Flask
Spacer Defect Detection
A computer vision system that detects 23 classes of defects in spacers, served through a Flask web app with bounding-box results and CSV export.
- 0.56
- mAP@0.5
- 0.431
- mAP@0.5:0.95
- 0.92
- Best class mAP@0.5
The problem
Manual inspection of spacers is slow and inconsistent. The dataset was small — 1,015 labeled images across 23 defect classes — so the model had to generalize from little data.
Approach
- Transfer learning from the YOLOv5s checkpoint.
- Heavy data augmentation, expanding the training set to over 150,000 images.
- Flask app for uploading an image, viewing detections with bounding boxes and downloading results as CSV for quality-control systems.
Stack
- YOLOv5
- PyTorch
- Flask
- Computer Vision