I've been working on a project called PathVision to see if a regular traffic camera could produce the kind of data usually reserved for expensive dedicated sensors.
What it does:
- Detects and tracks vehicles in real time (YOLOv8 for detection, ByteTrack for tracking)
- Estimates actual speed in km/h by calibrating pixel displacement to real-world distance
- Maps vehicle paths across 4 entry/4 exit zones to build an Origin-Destination matrix
- Classifies live traffic condition (smooth/moderate/heavy)
- Exports everything to structured CSV: per-vehicle logs, OD matrix, top routes
The hard part wasn't detection. It was keeping track identity stable — surviving occlusion, not double-counting a vehicle, and knowing when a trip is actually "complete" vs. still active. Most naive tracking setups fall apart right there.
Current limitations (being upfront):
- Speed calibration (METERS_PER_PIXEL) is manual per camera — no automatic perspective correction yet
- Zones are hardcoded per view, not portable across setups without reconfiguring
- No formal accuracy benchmark yet (planning to validate against ground-truth data)
Demo video + OD analysis charts from a real test run:
https://youtube.com/shorts/KgDTsUhquNM?si=SLKOG3BJkAttB_vs
Code: https://github.com/anmarw38-ops/Pathvision/blob/530ec18c63a37db53a6e8c42519ca51717d00803/README.md
Would genuinely appreciate feedback — especially from anyone who's dealt with ID persistence in tracking, or worked on ITS/traffic systems. What would you tackle differently?