Mixed-Traffic Vehicle Detector, YOLO26n (v0.1)

A YOLO26n fine-tune that detects pedestrian / 2-wheeler / 3-wheeler / 4-wheeler in South Asian mixed traffic, trained on the Visaitech Mixed-Traffic Vehicle Detection dataset (v0.1). The class taxonomy covers what general-purpose COCO detectors don't: an auto-rickshaw class, and a single 2-wheeler class for how motorcycles and bicycles actually mix in this traffic.

This is an early v0.1 baseline trained on 239 images: a working proof of concept, not a production-grade detector. Expect it to improve as the dataset grows.

  • Architecture: YOLO26n (nano), ~2.5M parameters, ~5.4MB weights
  • Input size: 640x640
  • Classes: pedestrian (0), 2-wheeler (1), 3-wheeler (2), 4-wheeler (3)

Demo

Risk-zone demo on a congested street

The model wired into a simple proximity risk overlay: safe objects get a thin green outline, close objects are tagged orange (caution) or red (critical). The footage is a clip from the raw archive that ships with the training dataset. A higher-quality video of the same run is in this repo as demo.mp4, and the overlay code plus a runnable Gradio app live at github.com/visaitech/mixed-traffic-risk-detector.

Usage

from ultralytics import YOLO

model = YOLO("best.pt")
results = model.predict("street.jpg")
results[0].show()

Evaluation

Validation split: 54 images / 209 boxes, held out by whole source video (not by frame) so near-duplicate frames never straddle the train/val boundary.

The model was trained and evaluated on the original frames. The published dataset is the anonymized copy (pixelated heads and license plates, blacked-out timestamp region), which changes object appearance enough to lower the numbers, so both are reported. If you re-run validation against the public dataset, expect the second table.

On original (non-public) frames

class instances precision recall mAP50 mAP50-95
pedestrian 9 0.688 0.333 0.383 0.250
2-wheeler 128 0.653 0.875 0.796 0.502
3-wheeler 32 0.494 0.854 0.764 0.560
4-wheeler 40 0.915 0.875 0.934 0.704
all 209 0.688 0.734 0.719 0.504

On the published anonymized frames

class instances precision recall mAP50 mAP50-95
pedestrian 9 0.656 0.333 0.251 0.166
2-wheeler 128 0.620 0.750 0.695 0.332
3-wheeler 32 0.538 0.719 0.708 0.509
4-wheeler 40 0.485 0.875 0.862 0.648
all 209 0.575 0.669 0.629 0.414

Training details

  • Fine-tuned from the official yolo26n.pt COCO checkpoint with Ultralytics defaults (auto optimizer, lr0 0.01, seed 0), image size 640, batch 8.
  • Early-stopped at epoch 105 of a 150-epoch budget (patience 30); best checkpoint from epoch 75.
  • Trained on CPU (laptop-class i7-10510U, ~94s/epoch, under 3 hours total): the dataset is small enough that this was more stable than the available 2GB-VRAM laptop GPU.

Limitations

  • Weak on pedestrians: recall is only 0.333. The v0.1 training set has just 39 pedestrian boxes (~2.6% of all boxes), so this class needs more data, not more training. Do not rely on this model to find people.
  • Daytime only: all training footage is daylight (10:14 to 16:19). Performance on night footage is untested and likely poor.
  • Single camera setup: all frames come from the same dashcam hardware and region. Expect domain shift on other cameras, mounting positions, or countries.
  • Not a safety component: this is a portfolio/research baseline. Do not use it for collision avoidance, driver assistance, or any safety-critical decision.

License

AGPL-3.0. The model is a fine-tune of Ultralytics YOLO26n weights and is used via the AGPL-3.0-licensed ultralytics package, so the weights are released under the same license. The training dataset is separately licensed CC BY 4.0.

Citation

@misc{visaitech_mixed_traffic_yolo26n_2026,
  title        = {Mixed-Traffic Vehicle Detector, YOLO26n},
  author       = {Visaitech},
  year         = {2026},
  version      = {0.1},
  publisher    = {Hugging Face},
  url          = {https://huggingface.co/visaitech/vehicle-mixed-traffic-yolo26n}
}
Downloads last month
47
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train visaitech/vehicle-mixed-traffic-yolo26n