# maiabboud-prog/multi-camera-people-tracking architecture

> Architecture diagram of the GitHub repository maiabboud-prog/multi-camera-people-tracking, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maiabboud-prog/multi-camera-people-tracking
- Repository: https://github.com/maiabboud-prog/multi-camera-people-tracking

## Overview

Multi Camera People Tracking is a configured, multi-camera people-detection and re-identification application. The user supplies a YAML configuration and camera sources; the runtime captures frames, detects people, extracts embeddings, and matches them against a bounded identity gallery shared across cameras. It annotates and combines camera views for optional display or video saving. Model downloads are a separate setup capability. The main loop is excerpted, but some camera setup and cleanup details are omitted, so the graph shows only evidenced runtime links.

Main entry points: [`main.py`](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py) (Tracking loop), [`download_model.py`](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/download_model.py) (Model downloader), [`object_detection.py`](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/object_detection.py) (Person detector), [`feature_extraction.py`](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/feature_extraction.py) (Feature extractor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Tracking runtime"]
  node_config["YAML configuration<br/>[main.py]"]
  node_tracker["Tracking loop<br/>[main.py]"]
  node_camera["Camera sources<br/>[main.py]"]
  node_identity[("Identity gallery<br/>[main.py]")]
end

subgraph group_inference["Vision inference"]
  node_detector["Person detector"]
  node_reid["Feature extractor"]
end

subgraph group_presentation["Output and display"]
  node_coordinates["Box coordinate mapping<br/>[helpers.py]"]
  node_image_stack["Camera view stacking<br/>[helpers.py]"]
  node_display["Live display<br/>[main.py]"]
  node_video_output["Video saving<br/>[main.py]"]
end

subgraph group_setup["Model setup"]
  node_model_downloader["Model downloader<br/>[download_model.py]"]
end

node_user(("Operator"))
node_model_host["Google Drive"]

node_user -->|"provides settings"| node_config
node_config -->|"configures runtime"| node_tracker
node_user -->|"provides sources"| node_camera
node_tracker -->|"reads frames"| node_camera
node_tracker -->|"predicts people"| node_detector
node_tracker -->|"rescales boxes"| node_coordinates
node_tracker -->|"extracts features"| node_reid
node_tracker -->|"matches and updates"| node_identity
node_tracker -->|"stacks views"| node_image_stack
node_tracker -->|"shows frames"| node_display
node_tracker -->|"writes frames"| node_video_output
node_user -->|"requests model setup"| node_model_downloader
node_model_downloader -->|"downloads model"| node_model_host

click node_config "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py"
click node_tracker "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py"
click node_camera "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py"
click node_identity "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py"
click node_detector "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/object_detection.py"
click node_reid "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/feature_extraction.py"
click node_coordinates "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/helpers.py"
click node_image_stack "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/helpers.py"
click node_display "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py"
click node_video_output "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py"
click node_model_downloader "https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/download_model.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_config,node_tracker,node_camera,node_identity toneBlue
class node_detector,node_reid toneAmber
class node_coordinates,node_image_stack,node_display,node_video_output toneMint
class node_model_downloader toneRose
class node_user,node_model_host toneIndigo
```

## Components

### Tracking runtime

- [YAML configuration](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py): `main.py`
- [Tracking loop](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py): `main.py`
- [Camera sources](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py): `main.py`
- [Identity gallery](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py): `main.py`

### Vision inference

- [Person detector](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/object_detection.py): `object_detection.py`
- [Feature extractor](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/feature_extraction.py): `feature_extraction.py`

### Output and display

- [Box coordinate mapping](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/helpers.py): `helpers.py`
- [Camera view stacking](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/helpers.py): `helpers.py`
- [Live display](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py): `main.py`
- [Video saving](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/main.py): `main.py`

### Model setup

- [Model downloader](https://github.com/maiabboud-prog/multi-camera-people-tracking/blob/main/download_model.py): `download_model.py`

### Other components

- **Operator**
- **Google Drive**

## Connections

- Operator → YAML configuration: provides settings (evidence: `README.md`)
- YAML configuration → Tracking loop: configures runtime (evidence: `main.py`)
- Operator → Camera sources: provides sources (evidence: `main.py`)
- Tracking loop → Camera sources: reads frames (evidence: `main.py`)
- Tracking loop → Person detector: predicts people (evidence: `main.py`)
- Tracking loop → Box coordinate mapping: rescales boxes (evidence: `main.py`)
- Tracking loop → Feature extractor: extracts features (evidence: `main.py`)
- Tracking loop → Identity gallery: matches and updates (evidence: `main.py`)
- Tracking loop → Camera view stacking: stacks views (evidence: `main.py`)
- Tracking loop → Live display: shows frames (evidence: `main.py`)
- Tracking loop → Video saving: writes frames (evidence: `main.py`)
- Operator → Model downloader: requests model setup (evidence: `README.md`)
- Model downloader → Google Drive: downloads model (evidence: `download_model.py`)
