Project Overview
TrafficFlow AI is a real-time vehicle radar system that uses computer vision to detect and count cars in a predefined area, identifying traffic jams and analyzing flow patterns as they happen.
The project was built during HackBCN, a 30-hour hackathon, by a team of 3 members. For most of us, it was the first time integrating an AI model into a real project.
My Role
My responsibilities spanned both ends of the stack. On the AI side, I implemented the YOLOv10 model to detect and count vehicles within a defined region of interest in the video feed. On the frontend side, I built the Next.js client to display the live detection results and traffic analysis in a clear, visual interface.
The biggest challenge was time: learning how to work with YOLOv10, integrate it into a pipeline, and ship a working demo — all within 30 hours and with no prior AI project experience.
Design Process
Step 1 — Problem Definition
Define a traffic monitoring use case achievable within 30 hours: detect vehicles in a fixed area and identify congestion in real time.
Step 2 — Model Selection
Evaluated object detection options and selected YOLOv10 for its balance of speed and accuracy, suitable for real-time inference.
Step 3 — YOLOv10 Integration
Set up the Python inference pipeline: load the model, define the region of interest, and run frame-by-frame vehicle detection on a video stream.
Step 4 — Traffic Logic
Implement vehicle counting and congestion thresholds to classify traffic state (free flow, slow, jammed) based on detected car density.
Step 5 — Frontend
Built the Next.js interface to consume the detection data and display live stats, vehicle counts, and traffic state in a dashboard.
Step 6 — Demo & Presentation
Integrated all components into a working end-to-end demo and presented at HackBCN with real-time detection running on sample traffic footage.
Features
Tech Stack
| Layer | Technology |
|---|---|
| Object detection | YOLOv10 |
| AI / inference | Python |
| Frontend | Next.js |
Conclusions
TrafficFlow AI was a first contact with applied AI under real pressure. Going from zero AI project experience to a working YOLOv10 pipeline with a live frontend in 30 hours forced rapid learning and decisive prioritization.
Beyond the technical side, the hackathon context taught us to scope aggressively, cut non-essential features early, and focus energy on what makes a demo convincing. The result was a functional traffic radar that detected vehicles in real time and classified congestion. Given more time, the pipeline could support more camera angles, real traffic feeds, and finer congestion thresholds.