Vehicle Speed Estimator
Summary
A Flask app that detects vehicles in video, sorts them by type and direction, and estimates their speed — built on a YOLOv8 model we fine-tuned ourselves, as an academic team project.
Problem
Getting a speed figure out of ordinary video means detecting, classifying and then tracking each vehicle across frames. Per-frame accuracy isn't enough; lose a vehicle between two frames and the speed estimate is wrong rather than missing.
Constraints
- C01No existing labeled set matched the camera angles and vehicle mix we needed
- C02Training compute was Google Colab sessions, not dedicated GPUs
- C03A shared course timeline and shared ownership across the team
Architecture
YOLOv8 fine-tuned on RoboFlow data for vehicle detection and classification.
Per-vehicle tracking across frames feeds the direction and speed calculation.
OpenCV handles frame extraction and overlay drawing.
Flask serves detections and speed estimates from an uploaded video.
Decisions
Results
Retrospective
Colab's session limits forced tighter, more deliberate training runs than unlimited compute would have — a useful constraint, though it also means we never found the model's real ceiling. With more compute I'd spend it on tracking through occlusion, where vehicles pass behind each other and the speed estimate breaks.