CiviWatch Traffic Models (Vietnam Urban CCTV)
Suite of 3 fine-tuned traffic & urban safety object detectors built for CiviWatch v2 on 25,977 HD frames (299,157 boxes) from Ho Chi Minh City urban CCTV cameras (AIC_HCMC_2020) mixed with balanced pedestrian and obstacle annotations.
Repository code: remiehneppo/ai-camera (branch: civi-watch)
1. Included Models & Licenses
| Subdirectory | Model | Input Size | Decode Mode | File Sizes | License | Recommended Hardware |
|---|---|---|---|---|---|---|
yolox-tiny-416/ |
CiviWatch YOLOX-Tiny | 416x416 |
yolox_grid |
ONNX 20.2 MB / .pth 39 MB |
Apache-2.0 | CPU-only, Raspberry Pi 5, Rockchip RK3566/RK3588 NPU |
yolox-s-640/ |
CiviWatch YOLOX-s | 640x640 |
yolox_grid |
ONNX 35.8 MB / .pth 69 MB |
Apache-2.0 | Commercial Edge AI Box / GPU needing permissive Apache-2.0 |
yolo26s-640/ |
CiviWatch YOLO26s | 640x640 |
nms_free ([1, 300, 6]) |
ONNX 38.2 MB / .pt 20.3 MB |
AGPL-3.0 | Jetson Orin NX / GPU Server / Fast NMS-free CPU |
2. Class Schema (6 Classes)
{
"0": "person",
"1": "two_wheeler",
"2": "car",
"3": "bus",
"4": "truck",
"5": "obstacle_object"
}
3. Benchmark Results (AIC_HCMC_2020 Validation & Full-Edge Video Suite)
Evaluated directly inside CiviWatchDetector (ONNXRuntime CPUExecutionProvider) on 100 HCMC validation frames across day/night intersections:
| Model | two_wheeler Recall@0.4 |
car Recall@0.4 |
bus Recall@0.4 |
truck Recall@0.4 |
Overall Recall@0.4 | Night Recall | Validation mAP50 (3,858 imgs) |
CPU P50 Latency |
|---|---|---|---|---|---|---|---|---|
| YOLOX-Tiny (COCO Baseline) | 14.2% | 54.2% | 31.2% | 35.7% | 22.7% | 4.8% | β | 21.1 ms |
| CiviWatch YOLOX-Tiny (416) | 90.5% | 84.9% | 81.2% | 94.3% | 89.5% | 91.9% | 82.1% | 20.6 ms |
| CiviWatch YOLOX-s (640) | 94.4% | 88.6% | 87.5% | 97.1% | 93.4% | 93.5% | 88.6% | 93.7 ms |
| CiviWatch YOLO26s (640) | 95.6% | 91.6% | 93.8% | 97.1% | 95.0% | 91.9% | 90.2% | 46.5 ms |
Full-Edge Video Pipeline Throughput (LivePerceptionRunner + ByteTrack + Homography + Outbox)
| Model | sample_01.mp4 (HCMC 720p) |
sample_02.mp4 (HCMC 720p) |
shibuya_crossing_1080p.mp4 |
|---|---|---|---|
| CiviWatch YOLOX-Tiny (416) | 24.3 FPS (1,642 dets) | 21.5 FPS (1,973 dets) | 19.6 FPS (1,640 dets) |
| CiviWatch YOLOX-s (640) | 12.0 FPS (1,828 dets) | 10.8 FPS (1,926 dets) | 10.0 FPS (1,635 dets) |
| CiviWatch YOLO26s (640 NMS-Free) | 14.8 FPS (1,648 dets) | 12.8 FPS (1,911 dets) | 10.3 FPS (1,235 dets) |
4. Quick Usage with CiviWatch
Download a model folder and pass its manifest.json and .onnx path to run_edge.py or CiviWatchDetector:
huggingface-cli download tieubaoca/CiviWatch-Traffic-Models --local-dir models/hf-civiwatch
# Run Edge Pipeline with YOLOX-Tiny HCMC (Apache-2.0, ~24 FPS CPU):
python run_edge.py --module-config fixtures/sample_module_config.json \
--source file --file sample_01.mp4 \
--manifest models/hf-civiwatch/yolox-tiny-416/manifest.json \
--model models/hf-civiwatch/yolox-tiny-416/yolox_tiny_civiwatch_416.onnx
# Run Edge Pipeline with YOLO26s HCMC (NMS-Free, 95.6% motorcycle recall):
python run_edge.py --module-config fixtures/sample_module_config.json \
--source file --file sample_01.mp4 \
--manifest models/hf-civiwatch/yolo26s-640/manifest.json \
--model models/hf-civiwatch/yolo26s-640/yolo26s_civiwatch_640.onnx
Preprocessing Notes
- YOLOX-Tiny / YOLOX-s (
yolox_grid): Top-left letterbox (pad=114),BGR, float32 range[0.0, 255.0](scale=1.0). - YOLO26s (
nms_free): Top-left letterbox (pad=114),RGB, float32 range[0.0, 1.0](scale=1/255.0), output tensor shape[1, 300, 6]as[x1, y1, x2, y2, score, class_id].