# siddhantkr07/dl-project architecture

> Architecture diagram of the GitHub repository siddhantkr07/dl-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/siddhantkr07/dl-project
- Repository: https://github.com/siddhantkr07/dl-project

## Overview

Sentinel AI is a multi-camera surveillance system: camera feeds are analyzed for people, objects, falls, and threats; threat verification and temporal smoothing reduce false alarms before alerts and live telemetry reach the dashboard. The repository also contains a separate feature-extraction and cross-camera reasoning stack, emergency assessment, and adaptive camera prioritization. The README documents the dashboard’s CLIP, pose, and smoothing capabilities; the sampled backend excerpt is incomplete, so their internal wiring is represented only where supported.

Main entry points: [`src/camera_node/camera_node.py`](https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/camera_node.py) (Camera processing), [`dashboard/app.py`](https://github.com/siddhantkr07/dl-project/blob/main/dashboard/app.py) (Stream and threat backend), [`src/emergency_engine/emergency_engine.py`](https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/emergency_engine.py) (Incident assessment), [`simulation/camera_simulator.py`](https://github.com/siddhantkr07/dl-project/blob/main/simulation/camera_simulator.py) (Camera simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vision["Camera Vision"]
  node_camera_node["Camera processing<br/>[camera_node.py]"]
  node_detector["Object detection<br/>[detector.py]"]
  node_tracker["Object tracking<br/>[tracker.py]"]
  node_features["Scene features"]
end

subgraph group_reasoning["Cross-Camera Reasoning"]
  node_correlator["Camera correlation"]
  node_fusion["Scene fusion<br/>[fusion_engine.py]"]
  node_gnn["Graph reasoning<br/>[gnn_reasoner.py]"]
  node_prioritizer["Camera prioritization"]
end

subgraph group_response["Threat Response"]
  node_emergency["Incident assessment"]
  node_classifier["Incident classification"]
  node_severity["Severity estimation"]
  node_alerts["Alert generation<br/>[alert_generator.py]"]
end

subgraph group_dashboard["Live Dashboard"]
  node_dashboard_app["Stream and threat backend<br/>[app.py]"]
  node_api["Dashboard API<br/>[routes.py]"]
  node_ui["Dashboard interface<br/>[dashboard.js]"]
end

subgraph group_simulation["Simulation"]
  node_main["Simulation runner<br/>[main.py]"]
  node_simulator["Camera simulator"]
  node_scenarios["Scenario generation"]
  node_dataset["Video dataset loader<br/>[dataset_loader.py]"]
end

node_camera(("Camera feeds"))
node_browser(("Operator browser"))

node_camera -->|"supplies frames"| node_camera_node
node_camera_node -->|"detects objects"| node_detector
node_camera_node -->|"tracks objects"| node_tracker
node_camera_node -->|"extracts features"| node_features
node_features -->|"provides features"| node_fusion
node_correlator --> node_gnn
node_main -->|"starts, reads frames"| node_simulator
node_main -->|"sets scenarios"| node_scenarios
node_simulator -->|"simulates feeds"| node_camera
node_dataset -->|"provides video sources"| node_simulator
node_browser -->|"requests dashboard"| node_dashboard_app
node_dashboard_app -->|"registers API"| node_api
node_dashboard_app -->|"streams telemetry"| node_ui
node_ui -->|"renders live status"| node_browser
node_dashboard_app -->|"emits threat alerts"| node_alerts
node_emergency -->|"classifies incidents"| node_classifier
node_emergency -->|"estimates severity"| node_severity
node_emergency -->|"generates alerts"| node_alerts

click node_camera_node "https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/camera_node.py"
click node_detector "https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/detector.py"
click node_tracker "https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/tracker.py"
click node_features "https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/feature_extractor.py"
click node_correlator "https://github.com/siddhantkr07/dl-project/blob/main/src/ccve/cross_camera_correlator.py"
click node_fusion "https://github.com/siddhantkr07/dl-project/blob/main/src/ccve/fusion_engine.py"
click node_gnn "https://github.com/siddhantkr07/dl-project/blob/main/src/ccve/gnn_reasoner.py"
click node_prioritizer "https://github.com/siddhantkr07/dl-project/blob/main/src/prioritizer/adaptive_prioritizer.py"
click node_emergency "https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/emergency_engine.py"
click node_classifier "https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/incident_classifier.py"
click node_severity "https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/severity_estimator.py"
click node_alerts "https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/alert_generator.py"
click node_dashboard_app "https://github.com/siddhantkr07/dl-project/blob/main/dashboard/app.py"
click node_api "https://github.com/siddhantkr07/dl-project/blob/main/dashboard/api/routes.py"
click node_ui "https://github.com/siddhantkr07/dl-project/blob/main/dashboard/static/js/dashboard.js"
click node_main "https://github.com/siddhantkr07/dl-project/blob/main/main.py"
click node_simulator "https://github.com/siddhantkr07/dl-project/blob/main/simulation/camera_simulator.py"
click node_scenarios "https://github.com/siddhantkr07/dl-project/blob/main/simulation/scenario_generator.py"
click node_dataset "https://github.com/siddhantkr07/dl-project/blob/main/data/dataset_loader.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_camera_node,node_detector,node_tracker,node_features,node_browser toneBlue
class node_correlator,node_fusion,node_gnn,node_prioritizer toneAmber
class node_emergency,node_classifier,node_severity,node_alerts toneMint
class node_dashboard_app,node_api,node_ui toneRose
class node_main,node_simulator,node_scenarios,node_dataset,node_camera toneIndigo
```

## Components

### Camera Vision

- [Camera processing](https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/camera_node.py): `src/camera_node/camera_node.py`
- [Object detection](https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/detector.py): `src/camera_node/detector.py`
- [Object tracking](https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/tracker.py): `src/camera_node/tracker.py`
- [Scene features](https://github.com/siddhantkr07/dl-project/blob/main/src/camera_node/feature_extractor.py): `src/camera_node/feature_extractor.py`

### Cross-Camera Reasoning

- [Camera correlation](https://github.com/siddhantkr07/dl-project/blob/main/src/ccve/cross_camera_correlator.py): `src/ccve/cross_camera_correlator.py`
- [Scene fusion](https://github.com/siddhantkr07/dl-project/blob/main/src/ccve/fusion_engine.py): `src/ccve/fusion_engine.py`
- [Graph reasoning](https://github.com/siddhantkr07/dl-project/blob/main/src/ccve/gnn_reasoner.py): `src/ccve/gnn_reasoner.py`
- [Camera prioritization](https://github.com/siddhantkr07/dl-project/blob/main/src/prioritizer/adaptive_prioritizer.py): `src/prioritizer/adaptive_prioritizer.py`

### Threat Response

- [Incident assessment](https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/emergency_engine.py): `src/emergency_engine/emergency_engine.py`
- [Incident classification](https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/incident_classifier.py): `src/emergency_engine/incident_classifier.py`
- [Severity estimation](https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/severity_estimator.py): `src/emergency_engine/severity_estimator.py`
- [Alert generation](https://github.com/siddhantkr07/dl-project/blob/main/src/emergency_engine/alert_generator.py): `src/emergency_engine/alert_generator.py`

### Live Dashboard

- [Stream and threat backend](https://github.com/siddhantkr07/dl-project/blob/main/dashboard/app.py): `dashboard/app.py`
- [Dashboard API](https://github.com/siddhantkr07/dl-project/blob/main/dashboard/api/routes.py): `dashboard/api/routes.py`
- [Dashboard interface](https://github.com/siddhantkr07/dl-project/blob/main/dashboard/static/js/dashboard.js): `dashboard/static/js/dashboard.js`

### Simulation

- [Simulation runner](https://github.com/siddhantkr07/dl-project/blob/main/main.py): `main.py`
- [Camera simulator](https://github.com/siddhantkr07/dl-project/blob/main/simulation/camera_simulator.py): `simulation/camera_simulator.py`
- [Scenario generation](https://github.com/siddhantkr07/dl-project/blob/main/simulation/scenario_generator.py): `simulation/scenario_generator.py`
- [Video dataset loader](https://github.com/siddhantkr07/dl-project/blob/main/data/dataset_loader.py): `data/dataset_loader.py`

### Other components

- **Camera feeds**
- **Operator browser**

## Connections

- Camera feeds → Camera processing: supplies frames
- Camera processing → Object detection: detects objects
- Camera processing → Object tracking: tracks objects
- Camera processing → Scene features: extracts features
- Scene features → Scene fusion: provides features
- Camera correlation → Graph reasoning
- Simulation runner → Camera simulator: starts, reads frames
- Simulation runner → Scenario generation: sets scenarios
- Camera simulator → Camera feeds: simulates feeds
- Video dataset loader → Camera simulator: provides video sources
- Operator browser → Stream and threat backend: requests dashboard
- Stream and threat backend → Dashboard API: registers API
- Stream and threat backend → Dashboard interface: streams telemetry
- Dashboard interface → Operator browser: renders live status
- Stream and threat backend → Alert generation: emits threat alerts
- Incident assessment → Incident classification: classifies incidents
- Incident assessment → Severity estimation: estimates severity
- Incident assessment → Alert generation: generates alerts
