Computer Vision

Why Generic Detectors Fail on Indian Traffic (and What We Do Instead)

Yash · 2026-04-14 · 7 min read


Drop a pre-trained YOLO model on a Mumbai intersection feed and watch it confidently call a cycle rickshaw a "bicycle," miss three-wheelers entirely, and classify a tractor-trolley as a truck. This isn't the model being bad. It's the model being trained on a world that doesn't include the vehicles actually on the road.

We've built three traffic-analytics products in the last eighteen months, all aimed at South Asian infrastructure clients. Every one of them required us to rebuild the category system from scratch.

The taxonomy problem

COCO gives you car, truck, bus, motorcycle, bicycle. Western dashcam datasets extend that to maybe van, SUV, pickup. For an Indian toll authority trying to attribute revenue by vehicle class, or a transportation consultancy delivering a capacity study, that taxonomy is worse than useless — it collapses the variance that matters for their actual work.

Our canonical fourteen-class system covers what actually shows up:

  • Two-wheelers (single and pillion)
  • Three-wheelers and auto-rickshaws
  • Cars and light commercial vehicles
  • Mini buses and standard buses
  • Rigid trucks
  • Tipper trucks
  • Multi-axle trucks
  • Tractors
  • Tractor-trolleys
  • Construction equipment
  • Cycles
  • Cycle rickshaws
  • An "others" bucket for genuine edge cases

The categories aren't arbitrary — each maps to a distinct toll-booking rate, a distinct pavement loading assumption, or a distinct environmental impact coefficient. A planner who can only see truck can't produce a defensible design document. A toll operator who can't distinguish a tractor-trolley from a multi-axle truck is leaving money on the table.

Why re-training isn't enough

You can fine-tune a COCO-pretrained model on a custom taxonomy and get reasonable top-line accuracy quickly. The problem is the edge cases, and traffic analytics is mostly edge cases.

Three categories of failure dominate:

Occlusion between heterogeneous vehicles. A COCO-era detector learned that vehicles are roughly the same size in the frame. In dense Indian traffic, a scooter weaves between a multi-axle truck and an auto-rickshaw, and at some point in the frame all three overlap. Identity tracking collapses; counts double-fire on every recovered detection.

Class boundaries that generic datasets don't care about. The visual difference between a mini-bus and a standard bus, or between a rigid truck and a tipper, is small — body geometry, wheel configuration, load-bed style. A model trained on a taxonomy where these are merged never learned to distinguish them.

Low-contrast lighting on darker pavement. Most Western driving datasets are captured in overcast northern European daylight on pale asphalt. Indian highways are high-contrast sun-and-shadow on dark asphalt for six months of the year. Detectors trained without that lighting distribution produce a flood of false negatives in the shadowed regions.

The fix isn't just more data

It's structural. Three architectural decisions matter.

A canonical category system as a single source of truth. Every detection flows through a normalisation layer before it reaches any downstream logic — counting, aggregation, reporting. That way, changing the underlying model is decoupled from changing the reports.

Layered filtering on top of raw detections. Before a bounding box becomes a count, it passes through a region-of-interest gate (is it on the road surface?), a persistence gate (did we see it across multiple frames?), and a class-consistency check (did the tracker keep the same class across the track?). This is the difference between a research demo and a number you'd put in a deliverable.

Zone-based counting, not line-crossing. Naive line-crossing logic breaks at line endpoints and under oblique camera angles — both common when operators mount dashcams on moving vehicles. A zone with a tolerance band produces stable counts across a much wider range of camera placements without per-site tuning.

The result

Across three different deployments — a multi-tenant SaaS, a standalone desktop tool, and an embedded field app — the same taxonomy and the same three-layer detection discipline produce counts that consulting firms actually sign off on. The model improves. The discipline doesn't change.

If you're building traffic analytics for a market where the vehicle mix isn't the one your detector was trained on, the question isn't whether to rebuild the category system. It's how quickly you can get there before a client runs the numbers and finds the gap.


← Back to Blog