# manju1303/indeent-detection architecture

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

- Interactive diagram: https://gitdiagram.com/manju1303/indeent-detection
- Repository: https://github.com/manju1303/indeent-detection

## Overview

This is a real-time multi-camera security and human-movement prediction system. Cameras provide frames to the main orchestrator, which runs detection, tracking, pose/torso analysis, violence and theft assessment, and sub-300ms intent prediction. Results are rendered into annotated streams, persisted as events and performance data, exposed through a live Flask dashboard, and optionally dispatched through local, email, or Telegram alerts. Some pipeline internals were sampled only partially, so uncertain helper-level relationships are omitted.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Video Input"]
  node_camera_manager["Camera Manager<br/>[camera_manager.py]"]
  node_main_system["Security System<br/>[main.py]"]
end

subgraph group_vision["Vision Analysis"]
  node_pipeline["Multi-Camera Pipeline<br/>[pipeline.py]"]
  node_detector["Person Detector<br/>[detector.py]"]
  node_tracker["Person Tracker<br/>[tracker.py]"]
  node_pose_estimator["Pose Estimator<br/>[pose_estimator.py]"]
  node_torso_features["Torso Features<br/>[pose_estimator.py]"]
end

subgraph group_risk["Risk Prediction"]
  node_intent_predictor["Intent Predictor"]
  node_intent_engine["Intent Engine<br/>[intent_engine.py]"]
  node_violence_detector["Violence Detector"]
  node_theft_detector["Theft Detector<br/>[theft_detector.py]"]
end

subgraph group_response["Alerts Storage"]
  node_event_logger[("Event Logger<br/>[logger.py]")]
  node_alert_manager["Alert Manager<br/>[alert_manager.py]"]
  node_local_alert["Local Alerts<br/>[local_alert.py]"]
  node_email_alert["Email Alerts<br/>[email_alert.py]"]
  node_telegram_alert["Telegram Alerts<br/>[telegram_alert.py]"]
end

subgraph group_interface["Live Interface"]
  node_drawer["Frame Drawer<br/>[drawing.py]"]
  node_dashboard["Live Dashboard<br/>[app.py]"]
end

node_operator(("Security Operator"))
node_camera_sources(("Camera Sources"))
node_telegram_service(("Telegram Service"))
node_smtp_service(("SMTP Service"))

node_camera_sources -->|"provides frames"| node_camera_manager
node_main_system -->|"starts cameras"| node_camera_manager
node_main_system -->|"processes frames"| node_pipeline
node_camera_manager -->|"supplies frames"| node_pipeline
node_pipeline -->|"detects people"| node_detector
node_pipeline -->|"tracks people"| node_tracker
node_pipeline -->|"estimates poses"| node_pose_estimator
node_pose_estimator -->|"extracts torso"| node_torso_features
node_pipeline -->|"predicts intent"| node_intent_predictor
node_intent_predictor -->|"classifies sequences"| node_intent_engine
node_pipeline -->|"scores violence"| node_violence_detector
node_pipeline -->|"detects theft"| node_theft_detector
node_pipeline -->|"renders results"| node_drawer
node_main_system -->|"logs events"| node_event_logger
node_main_system -->|"dispatches risks"| node_alert_manager
node_alert_manager -->|"sends locally"| node_local_alert
node_alert_manager -.->|"sends email"| node_email_alert
node_alert_manager -.->|"sends Telegram"| node_telegram_alert
node_email_alert -.->|"delivers email"| node_smtp_service
node_telegram_alert -.->|"posts alerts"| node_telegram_service
node_main_system -->|"starts dashboard"| node_dashboard
node_dashboard -->|"reads status"| node_camera_manager
node_dashboard -->|"reads streams"| node_pipeline
node_dashboard -->|"reads events"| node_event_logger
node_dashboard -->|"shows telemetry"| node_operator

click node_camera_manager "https://github.com/manju1303/indeent-detection/blob/main/core/camera_manager.py"
click node_main_system "https://github.com/manju1303/indeent-detection/blob/main/main.py"
click node_pipeline "https://github.com/manju1303/indeent-detection/blob/main/core/pipeline.py"
click node_detector "https://github.com/manju1303/indeent-detection/blob/main/core/detector.py"
click node_tracker "https://github.com/manju1303/indeent-detection/blob/main/core/tracker.py"
click node_pose_estimator "https://github.com/manju1303/indeent-detection/blob/main/core/pose_estimator.py"
click node_torso_features "https://github.com/manju1303/indeent-detection/blob/main/core/pose_estimator.py"
click node_intent_predictor "https://github.com/manju1303/indeent-detection/blob/main/core/intent_predictor.py"
click node_intent_engine "https://github.com/manju1303/indeent-detection/blob/main/core/intent_engine.py"
click node_violence_detector "https://github.com/manju1303/indeent-detection/blob/main/core/violence_detector.py"
click node_theft_detector "https://github.com/manju1303/indeent-detection/blob/main/core/theft_detector.py"
click node_drawer "https://github.com/manju1303/indeent-detection/blob/main/utils/drawing.py"
click node_event_logger "https://github.com/manju1303/indeent-detection/blob/main/utils/logger.py"
click node_alert_manager "https://github.com/manju1303/indeent-detection/blob/main/alerts/alert_manager.py"
click node_local_alert "https://github.com/manju1303/indeent-detection/blob/main/alerts/local_alert.py"
click node_email_alert "https://github.com/manju1303/indeent-detection/blob/main/alerts/email_alert.py"
click node_telegram_alert "https://github.com/manju1303/indeent-detection/blob/main/alerts/telegram_alert.py"
click node_dashboard "https://github.com/manju1303/indeent-detection/blob/main/dashboard/app.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_manager,node_main_system toneBlue
class node_pipeline,node_detector,node_tracker,node_pose_estimator,node_torso_features toneAmber
class node_intent_predictor,node_intent_engine,node_violence_detector,node_theft_detector toneMint
class node_event_logger,node_alert_manager,node_local_alert,node_email_alert,node_telegram_alert toneRose
class node_drawer,node_dashboard,node_operator,node_camera_sources,node_telegram_service,node_smtp_service toneIndigo
```

## Components

### Video Input

- [Camera Manager](https://github.com/manju1303/indeent-detection/blob/main/core/camera_manager.py): `core/camera_manager.py`
- [Security System](https://github.com/manju1303/indeent-detection/blob/main/main.py): `main.py`

### Vision Analysis

- [Multi-Camera Pipeline](https://github.com/manju1303/indeent-detection/blob/main/core/pipeline.py): `core/pipeline.py`
- [Person Detector](https://github.com/manju1303/indeent-detection/blob/main/core/detector.py): `core/detector.py`
- [Person Tracker](https://github.com/manju1303/indeent-detection/blob/main/core/tracker.py): `core/tracker.py`
- [Pose Estimator](https://github.com/manju1303/indeent-detection/blob/main/core/pose_estimator.py): `core/pose_estimator.py`
- [Torso Features](https://github.com/manju1303/indeent-detection/blob/main/core/pose_estimator.py): `core/pose_estimator.py`

### Risk Prediction

- [Intent Predictor](https://github.com/manju1303/indeent-detection/blob/main/core/intent_predictor.py): `core/intent_predictor.py`
- [Intent Engine](https://github.com/manju1303/indeent-detection/blob/main/core/intent_engine.py): `core/intent_engine.py`
- [Violence Detector](https://github.com/manju1303/indeent-detection/blob/main/core/violence_detector.py): `core/violence_detector.py`
- [Theft Detector](https://github.com/manju1303/indeent-detection/blob/main/core/theft_detector.py): `core/theft_detector.py`

### Alerts Storage

- [Event Logger](https://github.com/manju1303/indeent-detection/blob/main/utils/logger.py): `utils/logger.py`
- [Alert Manager](https://github.com/manju1303/indeent-detection/blob/main/alerts/alert_manager.py): `alerts/alert_manager.py`
- [Local Alerts](https://github.com/manju1303/indeent-detection/blob/main/alerts/local_alert.py): `alerts/local_alert.py`
- [Email Alerts](https://github.com/manju1303/indeent-detection/blob/main/alerts/email_alert.py): `alerts/email_alert.py`
- [Telegram Alerts](https://github.com/manju1303/indeent-detection/blob/main/alerts/telegram_alert.py): `alerts/telegram_alert.py`

### Live Interface

- [Frame Drawer](https://github.com/manju1303/indeent-detection/blob/main/utils/drawing.py): `utils/drawing.py`
- [Live Dashboard](https://github.com/manju1303/indeent-detection/blob/main/dashboard/app.py): `dashboard/app.py`

### Other components

- **Security Operator**
- **Camera Sources**
- **Telegram Service**
- **SMTP Service**

## Connections

- Camera Sources → Camera Manager: provides frames
- Security System → Camera Manager: starts cameras
- Security System → Multi-Camera Pipeline: processes frames
- Camera Manager → Multi-Camera Pipeline: supplies frames
- Multi-Camera Pipeline → Person Detector: detects people
- Multi-Camera Pipeline → Person Tracker: tracks people
- Multi-Camera Pipeline → Pose Estimator: estimates poses
- Pose Estimator → Torso Features: extracts torso
- Multi-Camera Pipeline → Intent Predictor: predicts intent
- Intent Predictor → Intent Engine: classifies sequences
- Multi-Camera Pipeline → Violence Detector: scores violence
- Multi-Camera Pipeline → Theft Detector: detects theft
- Multi-Camera Pipeline → Frame Drawer: renders results
- Security System → Event Logger: logs events
- Security System → Alert Manager: dispatches risks
- Alert Manager → Local Alerts: sends locally
- Alert Manager → Email Alerts: sends email
- Alert Manager → Telegram Alerts: sends Telegram
- Email Alerts → SMTP Service: delivers email
- Telegram Alerts → Telegram Service: posts alerts
- Security System → Live Dashboard: starts dashboard
- Live Dashboard → Camera Manager: reads status
- Live Dashboard → Multi-Camera Pipeline: reads streams
- Live Dashboard → Event Logger: reads events
- Live Dashboard → Security Operator: shows telemetry
