How it works

Processing Pipeline

Thirteen stages, from raw input to a 3D scene. Expand any stage for details.

01 Input02 Frame Capture03 Preprocessing04 Detection05 Segmentation06 Depth Estimation07 Pose Estimation08 Geometry Fusion09 3D Reconstruction10 Mesh Optimization11 Texture Mapping12 Spatial Analysis13 Output
01 Input · Acquire a source: live camera, RTSP/ONVIF stream, recorded video or a single image.

A source is registered (RTSP/ONVIF discovery, a file, or a looped clip). The reader opens the stream on its own thread and hands frames to a drop-oldest buffer so the analysis stage never blocks the camera.

Inputs
  • Camera / stream URL
  • Video file
  • Still image
Outputs
  • Raw frames
Tech
StreamReaderONVIF
02 Frame Capture · Pull frames into a bounded buffer with backpressure.

Frames land in a fixed-size FrameBuffer (drop-oldest). A health monitor watches for freezes and reconnects. A rolling window of recent frames is retained for incident clips and appearance search.

Inputs
  • Raw frames
Outputs
  • Buffered frames
  • Clip ring
Tech
FrameBufferHealthMonitor
03 Preprocessing · Normalise, low-light enhance and resize before inference.

Dark frames are auto-enhanced so faint subjects are still found; frames are resized to the working resolution. A background plate (EMA) accumulates the true static scene for later completion.

Inputs
  • Buffered frame
Outputs
  • Working frame
  • Background plate
Tech
Low-light enhanceEMA plate
04 Detection · Detect and classify objects with YOLO11 + class gating.

YOLO11 runs with per-class confidence floors and optional tiling. Disabled classes are dropped at the detector so nothing downstream pays for them. ByteTrack assigns stable ids inline.

Inputs
  • Working frame
  • Enabled classes
Outputs
  • Boxes + labels + track ids
Tech
YOLO11ByteTrack
05 Segmentation · Mask standing objects vs the static background plate.

Instance / foreground masks (YOLO11-seg) combine with a depth-derived foreground mask to decide which pixels are movers, so the background behind them can be reconstructed.

Inputs
  • Working frame
  • Depth
Outputs
  • Foreground masks
Tech
YOLO11-seg
06 Depth Estimation · Estimate a dense monocular depth field.

Depth Anything V2 produces relative inverse-depth, temporally median-fused across frames to suppress noise. The result is normalised to [0,1] and forms the geometry backbone.

Inputs
  • Working frame
Outputs
  • Normalised disparity grid
Tech
Depth Anything V2
07 Pose Estimation · Extract body keypoints for intent and gait.

A keypoint model runs on an interval over tracked people. Skeletons feed intent, posture cues and the gait descriptor used for cross-camera re-identification.

Inputs
  • Person crops
Outputs
  • Keypoints
  • Gait samples
Tech
Pose model
08 Geometry Fusion · Fuse depth, masks and detections into scene geometry.

Depth is ground-plane fitted behind occluders; foreground masks and boxes mark movers; a completed background depth + texture is inpainted so the scene continues behind objects.

Inputs
  • Depth
  • Masks
  • Background plate
Outputs
  • Scene + background geometry
Tech
Plane fitTELEA inpaint
09 3D Reconstruction · Back-project depth into a coloured point cloud.

The depth grid is unprojected through a pinhole model into a coloured point cloud, with depth smoothing so surfaces stay continuous and discontinuities are ramped rather than torn.

Inputs
  • Fused geometry
  • RGB grid
Outputs
  • Point cloud
Tech
Pinholethree.js
10 Mesh Optimization · Triangulate and clean the surface.

The point grid is triangulated into a mesh; triangles straddling a depth discontinuity (object silhouettes) are culled, yielding clean edges for both the scene and the background layer.

Inputs
  • Point cloud
Outputs
  • Optimised mesh
Tech
TriangulationEdge culling
11 Texture Mapping · Project RGB (and inpainted texture) onto the mesh.

The framed RGB, plus the inpainted background texture behind movers, is mapped onto the mesh, so occluded walls and floor render as real, textured surfaces.

Inputs
  • Mesh
  • RGB + inpainted texture
Outputs
  • Textured scene
Tech
UV projection
12 Spatial Analysis · Reason over the scene: tracks, foresight, identity, alerts.

Tracks gain velocity and predicted positions (foresight); contacts are placed on the depth-locked tactical radar; Re-ID links identities; the rule + threat engine raises correlated alerts.

Inputs
  • Tracks
  • Depth
  • Embeddings
Outputs
  • Predictions
  • Identities
  • Alerts
Tech
ForesightRe-IDThreat scorer
13 Output · Stream results and export scenes, clips and events.

Frames, detections, metrics and alerts stream over WebSocket to the UI. Scenes, incident clips, dossiers and event timelines can be exported. Everything persists locally in SQLite.

Inputs
  • All stage results
Outputs
  • Live streams
  • Exports
  • Event store
Tech
FastAPIWebSocketSQLite
Note

Heavy stages (depth, segmentation, pose, reconstruction) are interval-scheduled and cached rather than run on every frame, so the live path stays real-time. See performance optimizations.