← Portfolio
TRAFFIC INFERENCE STUDY← Back to demo

METHOD & ASSETS

What this demo measures

The detector is the pretrained Ultralytics YOLO11n checkpoint used in the Kaggle study, exported to a static ONNX FP32 graph at 320 × 320 pixels, batch one. Exported weights are about 10.1 MiB. ONNX Runtime Web 1.22.0 runs in a module worker using WebGPU where available, with single-thread WebAssembly CPU fallback. Runtime files are served with this site and add an initial download beyond the model.

The input is letterboxed with RGB padding 114, normalized to [0,1] and arranged NCHW. Output is decoded as [1,84,2100], using the maximum of all 80 class scores before selecting car, motorcycle, bus and truck. Class-aware nonmaximum suppression uses an IoU threshold of 0.7. The confidence slider defaults to 0.25.

Tracking uses a lightweight class-aware greedy IoU and centroid association, with a 0.8-second expiry, three observations before a crossing can count, and a dead band around the line. Each track counts once; IDs may change after occlusion. This browser tracker is separate from the Python study's ByteTrack. The dashed road zone counts current detection centers; it is not a calibrated occupancy measurement. Crossings and occupancy remain unvalidated.

Playback is independent of detection. The page submits at most 15 frames/second and allows one frame in flight, keeping fresh work instead of building a backlog. Overlays expire after 1.2 seconds. Processing FPS uses completed frames over a rolling three-second window. Frame latency measures wall time from capture submission to result receipt, including capture, worker transfer, preprocessing, inference, decoding and tracking. p95 uses up to the most recent 60 completed frames. These are browser demo measurements, not the T4 benchmarks.

The sample contains the first 30 continuous seconds of E18-Lysaker (02), recorded by Kjetil_r on 23 April 2010 and released by its creator into the public domain. The original is 30.4 seconds at 1280 × 720, 30 FPS. This version is trimmed to 30 seconds, resized to 960 × 540, muted and re-encoded as H.264 MP4. Playback runs once and stops; it never loops automatically. This is demonstration footage without detection or counting ground-truth labels. Local uploads stay in browser memory, have a 100 MiB file limit, and run for at most the first 60 seconds. No video upload API or analytics service is used. Fonts, model, video and runtime files are served from this website.

The benchmark figures comes from one Kaggle Tesla T4 session on 2 November 2026. Ten randomized timing rounds used at least 20 seconds per trial with real-image warm-up. Timing includes preprocessing, inference, NMS and CPU result transfer; it excludes video decode and tracking. Accuracy uses 4,488 COCO val2017 images disjoint from 512 calibration images. One ONNX CUDA FP32 trial had a recorded thermal flag and was retained. The figures do not establish counting accuracy, browser throughput or production camera capacity.

Dependencies and provenance: ONNX Runtime Web (MIT; license bundled in assets), Ultralytics YOLO11 (Ultralytics licensing applies to the checkpoint), and the public-domain E18 recording by Kjetil_r. See the source package for hashes and setup instructions.