Home / Flagship work / VIDS

Case study Arya Omnitalk · production

VIDS — edge AI that logs every vehicle on the highway, not just the violators.

VIDS (Video Incident Detection System, VIDES inside the company) is the system I build at Arya Omnitalk for highway enforcement and incident monitoring. Each gantry has its own GPU box. It reads the camera streams, detects and tracks every vehicle, reads its number plate, measures its speed, checks it for violations, and stores the result as evidence. The control room gets checked events with photos and video, not raw footage.

Most enforcement systems only record violators. VIDS records every vehicle that passes, with class, plate, speed and evidence. That gives the road operator full traffic counts and a way to audit toll records, not only a list of fines.

The records are used as legal evidence, so the rule on this project is simple: being correct and staying up come before new features.

Role
Developer of the backend AI service, the operator dashboard and the ATMS data sync service
Edge
NVIDIA Jetson Orin Nano / Orin NX at the gantry · TensorRT FP16
GPU server
12 cameras with every detector on, on one RTX 5060 Ti
Customers
NHAI, highway concessionaires and traffic authorities
Status
In production · proprietary

Unique vehicles a day

50K+

~100 km corridor, a gantry every ~10 km, repeat sightings counted once

ANPR accuracy

90%+

plate read correctly, measured in the field

One gantry, 30 days

620K+

detections from a single Jetson Orin Nano

Cameras on one GPU

12

RTX 5060 Ti, 1080p, every detector on

Violation & incident types

16

plus ANPR and speed on every vehicle

Models on one node

7

6 TensorRT FP16 engines + PP-OCRv4

Detect + track, Orin Nano

126ms

median per frame, 3 ANPR cameras sharing the GPU

Automated tests

2,100+

backend, dashboard and sync service

Architecture one node per gantry, or one GPU server for many

Every camera runs the same core. Then the lane cameras do enforcement and the overview camera does incidents.

  1. 01RTSP → GPU decodeGStreamer · keeps only the newest frame
  2. 02Vehicle detectioncustom-trained YOLO · TensorRT FP16 · 7 classes
  3. 03TrackingByteTrack · trajectories · speed
  4. 04Early filteringROI · lane · direction · size · track quality

Lane cameras · enforcement

  • ANPRplate detector (YOLO) → PP-OCRv4 · plate locks after 2 matching reads
  • Helmet & triple ridingtwo-wheelers only
  • Seatbeltwindshield area · cars and larger
  • Speed & lane rulesoverspeed, slow, wrong lane, wrong way, banned class
Detection finalizerjoins all results for one vehicle → a violation, or a clean recorded passage

Overview camera · incidents

  • Trajectory rulesstopped vehicle · illegal parking · accident · queue
  • RT-DETRpedestrians, animals and debris on the road
  • Pothole scandaylight hours only
  • Visibility checkfog or a dirty lens
Incident managermerges repeat alerts so one incident is one event
Async DB writer → PostgreSQLcamera threads never wait on SQL
SSE → Socket.IO → dashboardoperator verifies or discards, <150 ms after detection
ATMS sync servicesends every finished detection to the customer's ATMS

What it detects 16 types

  • Violationshelmet missing · triple riding · seatbelt missing · overspeed / slow moving · wrong lane · wrong way · banned vehicle class
  • Incidentsstopped vehicle · illegal parking · queue · accident · pedestrian on the road · animal on the road · debris · pothole · low visibility
  • Every vehicleclass (car, truck, bus, mini bus, auto, bike, tractor), number plate, speed and evidence photo
  • In progressfire and smoke detection

Evidence you can defend it ends up in front of officials

  • Nothing is deleteda detection only moves through statuses (new, verified, approved, rejected, closed), and a database trigger enforces the allowed steps
  • Boxes on the right framecrops come only from the frame the box was detected in, so the plate box never drifts onto another car
  • Video clipsshort clips are encoded on their own threads, so the camera loop never waits
  • A human decidesevery violation goes to an operator with evidence to verify or discard, and discards are kept for audit

Hard problems, and how I solved them

A

No hardware encoder

Streams decode straight into GPU memory. The Orin Nano has no video encoder, so the live preview gets the original H.264 stream passed through instead of re-encoding it.

B

Latency that can't drift

Each camera keeps only its newest frame. If inference slows down, old frames are dropped, not queued, so the system stays close to real time instead of falling minutes behind.

C

Filter first, run models later

Cheap checks (ROI, lane, direction, size, track quality) throw away irrelevant vehicles before any expensive model runs. Models whose rules are switched off stay idle.

D

Plates you can trust

Contrast fix and sharpening before OCR, a penalty for blurry crops, fixes for O/0 and I/1 by position, and a plate is only final after 2 matching reads.

E

One slow model can't block a record

ANPR, helmet and seatbelt run in parallel worker pools on bounded queues. The finalizer joins their results per vehicle and has a timeout, so a slow model never holds up the record.

F

Seven models, one small GPU

All GPU work goes through one lock so TensorRT contexts never collide on an 8 GB Jetson. RT-DETR runs on a subset of frames and the pothole scan once an hour, which keeps everything inside the memory budget.

G

Three services, no shared code

The AI service, the dashboard and the ATMS sync only talk through the database, an SSE stream and an HTTP control API. Any one of them can be restarted or upgraded on site without touching the others.

H

Speed from one camera

Speed comes from the vehicle's track and a per-camera calibration (homography or a fitted row-to-metres curve). Each camera can use the method that suits its view.

Scaling up: from one gantry to 12 cameras on one GPU

Longer write-ups: the 12-camera scale-up and the dog that never raised an alert.

VIDS started on a Jetson Orin Nano at each gantry: 3 lane cameras and 1 overview camera. Some sites need many cameras in one place, so we moved those to a GPU server with an RTX 5060 Ti. How many cameras a box can take depends on the hardware, so I tested it: 12 cameras at 1080p with every detector switched on.

What broke

The first 12-camera run showed that about 90% of each camera's frame time was spent waiting for the GPU lock. Every overview camera loaded its own RT-DETR engine (about 12 engines) and ran it inside its own loop, so the cameras kept queuing behind each other.

The fix

  1. A shared pool of RT-DETR engines (one per gantry plus a spare), instead of one per camera.
  2. Cameras hand a request to the pool and pick up the result on a later frame, so they never wait.
  3. Each camera keeps only its newest request, and results older than 1 second are dropped, never applied.
  4. A hung or crashed engine is replaced automatically, and vehicle detection carries on while it's down.

The target is at least 7 fps per camera at an 8 fps cap on all 12 cameras. The Jetson setup stays as it was.

A field bug: the dog that never raised an alert

On site, a dog stood still in a lane and people walked on the road, and VIDS raised nothing. TMCS, running the same model on the same view, did alert. I reproduced it from the recorded frames and found two causes:

  1. The tracker never started a track for it. The tracker's default score fusion needs a fairly strong score to start a new track, and it drops a new track after one miss. A dog scoring around 0.4 never got an ID, and VIDS only looks at tracked objects. I shipped a config hotfix the same day, then ported the TMCS tracker, which keeps a weak new track alive for one miss.
  2. It was too small for the model. Squeezing the lane area into a 640 px input shrank the dog to about 14×20 px. On the full view the model read it as a "person" at 0.43; cropped, it was a dog at 0.85. Now wide areas are cut into tiles no wider than 960 px and the detections are merged.

Every step that drops a detection is now counted in a per-minute log line, so the next silent miss is visible in the logs instead of only showing up in the field.

Why at the edge

Central / cloudVIDS at the gantry
Latencynetwork round trip before any decisiondecided at the roadside
Bandwidthraw video uploaded all dayevents and evidence crops only
Privacyraw footage leaves the siteframes processed on site, only evidence kept

Stack

  • Python
  • Flask
  • GStreamer
  • OpenCV
  • YOLO
  • RT-DETR
  • ByteTrack
  • PaddleOCR PP-OCRv4
  • TensorRT FP16
  • CUDA
  • Jetson Orin
  • RTX 5060 Ti
  • PostgreSQL
  • SSE
  • Socket.IO
  • MediaMTX
  • systemd
  • pytest

VIDS is a proprietary Arya Omnitalk system. Source code, sites, customers and internal documents are confidential. This page describes the design at a level that's fine to share in public.