Skip to content

00Real-time computer vision analytics

VIGILAI

Video in. Events out.

Track objects. Define space. Detect what matters. Turn live or recorded video into persistent identities, spatial analytics, configurable alerts, and evidence you can investigate.

SOURCES ── LOCAL VIDEO / WEBCAM / RTSP

Spatial analysis / scene
Simulation
From persistent tracks to spatial eventsIllustration of a camera frame in normalized coordinates with a polygon zone, a virtual crossing line, and tracked objects with bounded trajectories. This is a diagram, not a live camera feed.ZONELINEx, y ∈ [0, 1]
ILLUSTRATIVE SIMULATION · NO LIVE CAMERA DATA
  1. Detect
  2. Track
  3. Cross
  4. Event
  5. Evidence

The full path. Frame to evidence.

  • YOLO
  • ONNX Runtime
  • ByteTrack
  • FastAPI
  • Next.js
  • PostgreSQL

01The signal chain

From pixels
to proof.

A prediction is only the beginning. VigilAI carries each frame through identity, geometry, policy, and a durable event record.

  1. 01

    Ingest

    RTSP · Webcam · Video

    OpenCV decode. Bounded frame buffers. Fresh frames first.

  2. 02

    Perceive

    YOLO · ONNX Runtime

    Typed detections: class, confidence, and bounding box.

  3. 03

    Track

    ByteTrack

    Associate detections across frames. Keep identity and trajectory.

  4. 04

    Understand

    Zones · Lines · Dwell

    Evaluate spatial transitions, direction, and occupancy.

  5. 05

    Decide

    Stateful rules

    Apply policy, thresholds, cooldowns, and deduplication.

  6. 06

    Record

    Events · Evidence

    Persist the incident. Capture the snapshot. Make it reviewable.

RUNS IN A DEDICATED CV WORKER. THE API KEEPS SERVING REQUESTS.

02Operational capabilities

More than
bounding boxes.

Computer vision, temporal logic, and a connected operator console. Each part has a job beyond drawing a box.

  • 01

    Multi-object tracking

    Persistent ByteTrack IDs connect detections across frames, powering unique counts and bounded trajectory history.

    Identity / Time

  • 02

    Spatial intelligence

    Draw polygon zones and virtual lines. Detect entry, exit, and direction-aware crossings in normalized coordinates.

    Position / Context

  • 03

    Stateful event engine

    Dwell and occupancy thresholds become events with cooldowns, deduplication, and resolution semantics.

    Policy / Lifecycle

  • 04

    PPE safety analytics

    Custom PPE detections are associated with people, smoothed over time, and evaluated against zone-aware rules.

    Person / Equipment

  • 05

    Real-time operations

    Dedicated camera pipelines publish frames, status, and events through Redis to the API and WebSocket clients.

    Workers / Telemetry

  • 06

    Forensic evidence

    Annotated snapshots preserve event context. Filter historical incidents, review evidence, and export event records.

    Incident / Record

03Custom model / PPE

Safety has
a context.

YOLOv8 fine-tuning meets person-centric logic. Equipment detections become a temporal compliance state tied to a tracked person.

Custom training → held-out evaluation

A helmet is an object.
Compliance is a relationship.

Fine-tuned on the training split of a 1,416-image Construction-PPE dataset with 11,521 labeled instances overall. The pipeline associates equipment with each person, smooths observations over time, and applies the requirements of the relevant zone.

  • Person-centric equipment association
  • Temporal confirmation and recovery
  • Zone-aware rules and evidence capture
Compliance logicIllustrative
  1. Person track+ ZONE POLICY
    • HelmetOBSERVED
    • VestOBSERVED
    • GlovesMISSING
  2. Temporal confirmationGLOVES · MISSING

    Repeated observations → confirmed state

  3. PPE violation→ EVIDENCE
DIAGRAM · NOT MODEL OUTPUTPER PERSON TRACK
Held-out PPE test set512 PX INPUT / 20 SEP 2026
  • Helmet AP@5092.7%Class · helmet
  • Vest AP@5089.8%Class · vest
  • Person AP@5084.2%Class · person
  • Overall mAP@5052.0%All 11 classes

Overall mAP@50–95: 26.1% across all 11 classes. Missing-equipment classes remain weaker; no_boots AP@50 is 1.1%. This is an evaluated project model, not a certified safety system.

Full evaluation JSON

04Measured performance

Benchmarks.
Not buzzwords.

Same PPE model. Same CPU. Two inference backends. Recorded measurements, with the conditions attached.

ONNX Runtime / PyTorch

1.56×

Measured CPU
inference throughput

CPU ONLYRATIO OF MEASURED FPS

  • PyTorch

    CPU / FP32
    Throughput16.40FPS
    MEAN
    60.96 ms
    P95
    75.23 ms
  • ONNX Runtime

    CPUExecutionProvider
    Throughput25.59FPS
    MEAN
    39.08 ms
    P95
    61.25 ms

BAR LENGTH = FPS RELATIVE TO ONNX RUNTIME

Hardware
Intel Core i5-13420H · CPU only
Input
512 × 512 px
Runs
10 warmup + 50 measured
Recorded
2026-09-20
GPU · TensorRT
NOT_MEASURED

Isolated inference throughput; full video pipeline performance varies. GPU and TensorRT results: NOT_MEASURED.

Inspect benchmark JSON

05Runtime architecture

Separate processes.
Connected system.

Inference, delivery, and persistence have distinct responsibilities. Camera state stays scoped to each camera pipeline.

VigilAI / runtime topologyDATA FLOW ↓
SourcesLocal videoRTSPWebcam
Dedicated CV workerPER-CAMERA PIPELINES
  1. 01Decode + bounded buffer
  2. 02YOLO / ONNX
  3. 03ByteTrack
  4. 04Geometry + PPE
  5. 05Rules + event state
  6. 06Evidence capture
  • WRITE EVENTS ↓PostgreSQLEvents · Rules · ConfigurationREAD / WRITE ↕
  • CAPTURE ↓Evidence storageAnnotated snapshotsAUTHORIZED READ ↓
  • PUBLISH ↓RedisFrames · Status · EventsSUBSCRIBE ↓
FastAPIAUTHORIZATION / REST / WEBSOCKETS / MJPEG

REQUESTS ↑ STREAMS + RESPONSES ↓

Next.js consoleOPERATIONS → CONFIGURATION → INVESTIGATION

Built for real-time,
not demo-time.

01Detection ≠ tracking
Persistent identities power unique counts and temporal analytics.
02Freshness > backlog
Bounded buffers drop stale frames instead of accumulating latency.
03Events require state
Cooldowns and lifecycle management prevent repeated alert spam.
04Geometry scales
Zones and lines use normalized coordinates, independent of resolution.
05Inference ≠ HTTP
Long-running CV execution lives outside the API process.

07Security / by design

Cameras are
sensitive infrastructure.

Camera infrastructure is treated as security-sensitive from the API boundary to the evidence file.

Controls in the API

  • HttpOnly authentication cookies

    Session credentials stay outside client-side JavaScript.

  • Resource ownership checks

    Camera resources and evidence are scoped to their owner.

  • Camera-bound stream tickets

    Short-lived credentials authorize a specific camera stream.

  • Protected media and credentials

    Encrypted RTSP credentials, upload validation, and evidence path checks.

The toolchain

Vision
YOLO / ONNX Runtime / ByteTrack / OpenCV
Backend
FastAPI / SQLAlchemy / PostgreSQL / Alembic
Realtime
Redis / WebSockets / MJPEG
Frontend
Next.js / React / TypeScript / Tailwind
Deployment
Docker / Docker Compose

From the first frame to the final record.

Put video
to work.

Launch VigilAI

LOCAL VIDEO · WEBCAM · RTSP

Trace the pipeline