Skip to content

Architecture

Hemkesh R edited this page Nov 16, 2026 · 1 revision

Architecture

Sentinel beta.1 processes one RTSP camera on the Jetson. Detection, tracking, identity processing and model inference run locally. The v2 dashboard is part of the sentinel runtime, not the separate legacy Flask application.

Data flow

flowchart TB
    CAMERA["RTSP camera"] --> CAPTURE
    subgraph JETSON["NVIDIA Jetson — local processing"]
        CAPTURE["Capture and frame buffers"]
        DETECT["YOLOv8n / TensorRT + ByteTrack"]
        RULES["Zone and scene rules"]
        STATE["Track state and bounded RAM history"]
        DB[("SQLite incidents and outbox")]
        FACE["YuNet + Facenet512 + track association"]
        GALLERY[("Sealed gallery")]
        MODEL["LFM3-VL-2B / llama.cpp"]
        UI["Dashboard and status server"]
        ALERT["Alert delivery worker"]
        CAPTURE --> DETECT --> RULES
        RULES --> STATE
        RULES --> DB --> ALERT
        DETECT -. frames and tracked people .-> FACE
        GALLERY -. matching .-> FACE
        FACE -. identity context .-> STATE
        CAPTURE -. frames .-> MODEL
        MODEL -. scene reports .-> RULES
        CAPTURE -. live preview .-> UI
        STATE --> UI
        DB --> UI
        MODEL -. visual answers .-> UI
    end
    UI <-->|SSH tunnel| BROWSER["Operator browser"]
    ALERT -. when configured .-> TELEGRAM["Telegram"]
Loading

Dashed paths are optional. Telegram is off in the tester profile; it is the optional external delivery path, not an inference service. Downloading dependencies/models during setup is separate from local runtime inference.

Identity and track life

A face is associated with at most one tracked person and vice versa. Ambiguous ownership stays unresolved. Matching produces raw evidence; the opt-in retention ledger separately records an established identity on a continuous track life. It can retain that association while reporting the absence of a current match.

Track-life, stream-epoch, freshness, ambiguity, contradiction and time boundaries end retention. No identity crosses a reused track number or runtime restart merely because the number matches. Identity is context, not an access decision. A scene-model report alone cannot establish a critical fire alert.

Two kinds of Ask answer

Visual questions go to the shared on-device scene/chat model. Scene monitoring takes priority. Chat work, held frames and region crops have bounded storage, scheduling and expiry; zoom/scan refer to one explicit picture rather than moving the camera.

Supported records questions read track state, bounded RAM history and fixed read-only SQLite queries. They do not ask the model to invent history or identify a face. Answers state coverage, gaps and whether they refer to a current or historical state.

Dashboard and supervision

The server binds to 127.0.0.1:18090. Its status, incident and preview routes reuse the runtime's existing capture and records. Polling updates the page in place; a stale page cannot keep claiming current status.

Appearance is browser-local. Runtime feature controls require the operator key plus same-origin/page-token checks. The tester launcher adds an external memory-guard supervisor; this is not an always-running service installed at boot.

Source map

Responsibility Source
Capture and frame freshness src/sentinel/media/
Detection and tracking src/sentinel/inference/, src/sentinel/tracking/
Identity, gallery and retention src/sentinel/identity/
Rules, incidents and storage src/sentinel/rules/, src/sentinel/incidents/, src/sentinel/storage/
Model server, visual chat and regions src/sentinel/scene/
Records answers and history src/sentinel/chat_evidence.py, src/sentinel/history.py
Dashboard and request checks src/sentinel/status_page.py, src/sentinel/web/
Runtime composition src/sentinel/demo_runtime.py, src/sentinel/cli.py
Installer and guarded builds packaging/beta-install/
Runtime memory guard benchmarks/runner/step5_guard.py

Tagged beta source · Current README diagram · Status and limitations