How it works
Processing Pipeline
Thirteen stages, from raw input to a 3D scene. Expand any stage for details.
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.
- Camera / stream URL
- Video file
- Still image
- Raw frames
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.
- Raw frames
- Buffered frames
- Clip ring
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.
- Buffered frame
- Working frame
- Background 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.
- Working frame
- Enabled classes
- Boxes + labels + track ids
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.
- Working frame
- Depth
- Foreground masks
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.
- Working frame
- Normalised disparity grid
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.
- Person crops
- Keypoints
- Gait samples
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.
- Depth
- Masks
- Background plate
- Scene + background geometry
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.
- Fused geometry
- RGB grid
- Point cloud
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.
- Point cloud
- Optimised mesh
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.
- Mesh
- RGB + inpainted texture
- Textured scene
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.
- Tracks
- Depth
- Embeddings
- Predictions
- Identities
- Alerts
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.
- All stage results
- Live streams
- Exports
- Event store
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.