# skysaksham/visiontrace architecture

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

- Interactive diagram: https://gitdiagram.com/skysaksham/visiontrace
- Repository: https://github.com/skysaksham/visiontrace

## Overview

VisionTrace is a desktop surveillance-footage exploration and person-tracking application. Users enter through the Qt interface, browse camera footage or start tracking, and can inspect camera relationships on a map; the tracking code detects people, extracts body embeddings, and follows a match across connected cameras. The supplied excerpts show the player, map, and portions of the tracking implementation, but do not establish the internal wiring of every page or the complete tracking pipeline. Facial, body-search, and fetch pages are present but their sampled implementations are placeholders.

Main entry points: [`main.py`](https://github.com/skysaksham/visiontrace/blob/main/main.py) (Application shell), [`pages/tracking.py`](https://github.com/skysaksham/visiontrace/blob/main/pages/tracking.py) (Video tracking), [`camera_map.json`](https://github.com/skysaksham/visiontrace/blob/main/camera_map.json) (Camera topology), [`pages/Trackpage.py`](https://github.com/skysaksham/visiontrace/blob/main/pages/Trackpage.py) (Tracking workers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_app["Application shell<br/>[main.py]"]
  node_home["Home page<br/>[homepage.py]"]
  node_viewer["Footage viewer<br/>[viewpage.py]"]
  node_trackpage["Tracking page<br/>[Trackpage.py]"]
  node_map["Camera map<br/>[map.py]"]
  node_fetch["Fetch page<br/>[fetchpage.py]"]
  node_bodysearch["Body search<br/>[bodysearchpage.py]"]
  node_facesearch["Face search<br/>[facesearchpage.py]"]
end

subgraph group_tracking["Person tracking"]
  node_tracking_engine["Video tracking<br/>[tracking.py]"]
  node_track_workers["Tracking workers<br/>[Trackpage.py]"]
  node_body_features["Body embeddings<br/>[reid.py]"]
end

subgraph group_assets["Footage and camera data"]
  node_embedding_file["Target embeddings<br/>[target_body.npy]"]
  node_camera_map["Camera topology<br/>[camera_map.json]"]
  node_footage["Video files"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_app
node_app -->|"shows"| node_home
node_app -->|"shows"| node_viewer
node_app -->|"shows"| node_trackpage
node_app -->|"shows"| node_map
node_app -->|"shows"| node_fetch
node_app -->|"shows"| node_bodysearch
node_app -->|"shows"| node_facesearch
node_app -->|"loads"| node_camera_map
node_viewer -->|"reads"| node_footage
node_map -->|"reads"| node_camera_map
node_trackpage -->|"starts"| node_track_workers
node_track_workers -->|"processes"| node_footage
node_track_workers -->|"reads"| node_camera_map
node_tracking_engine -->|"extracts"| node_body_features
node_tracking_engine -->|"reads"| node_embedding_file
node_tracking_engine -->|"reads"| node_camera_map
node_tracking_engine -->|"processes"| node_footage

click node_app "https://github.com/skysaksham/visiontrace/blob/main/main.py"
click node_home "https://github.com/skysaksham/visiontrace/blob/main/pages/homepage.py"
click node_viewer "https://github.com/skysaksham/visiontrace/blob/main/pages/viewpage.py"
click node_trackpage "https://github.com/skysaksham/visiontrace/blob/main/pages/Trackpage.py"
click node_map "https://github.com/skysaksham/visiontrace/blob/main/pages/map.py"
click node_fetch "https://github.com/skysaksham/visiontrace/blob/main/pages/fetchpage.py"
click node_bodysearch "https://github.com/skysaksham/visiontrace/blob/main/pages/bodysearchpage.py"
click node_facesearch "https://github.com/skysaksham/visiontrace/blob/main/pages/facesearchpage.py"
click node_tracking_engine "https://github.com/skysaksham/visiontrace/blob/main/pages/tracking.py"
click node_track_workers "https://github.com/skysaksham/visiontrace/blob/main/pages/Trackpage.py"
click node_body_features "https://github.com/skysaksham/visiontrace/blob/main/pages/reid.py"
click node_embedding_file "https://github.com/skysaksham/visiontrace/blob/main/embeddings/target_body.npy"
click node_camera_map "https://github.com/skysaksham/visiontrace/blob/main/camera_map.json"

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_app,node_home,node_viewer,node_trackpage,node_map,node_fetch,node_bodysearch,node_facesearch toneBlue
class node_tracking_engine,node_track_workers,node_body_features toneAmber
class node_embedding_file,node_camera_map,node_footage toneMint
class node_operator toneIndigo
```

## Components

### Desktop interface

- [Application shell](https://github.com/skysaksham/visiontrace/blob/main/main.py): `main.py`
- [Home page](https://github.com/skysaksham/visiontrace/blob/main/pages/homepage.py): `pages/homepage.py`
- [Footage viewer](https://github.com/skysaksham/visiontrace/blob/main/pages/viewpage.py): `pages/viewpage.py`
- [Tracking page](https://github.com/skysaksham/visiontrace/blob/main/pages/Trackpage.py): `pages/Trackpage.py`
- [Camera map](https://github.com/skysaksham/visiontrace/blob/main/pages/map.py): `pages/map.py`
- [Fetch page](https://github.com/skysaksham/visiontrace/blob/main/pages/fetchpage.py): `pages/fetchpage.py`
- [Body search](https://github.com/skysaksham/visiontrace/blob/main/pages/bodysearchpage.py): `pages/bodysearchpage.py`
- [Face search](https://github.com/skysaksham/visiontrace/blob/main/pages/facesearchpage.py): `pages/facesearchpage.py`

### Person tracking

- [Video tracking](https://github.com/skysaksham/visiontrace/blob/main/pages/tracking.py): `pages/tracking.py`
- [Tracking workers](https://github.com/skysaksham/visiontrace/blob/main/pages/Trackpage.py): `pages/Trackpage.py`
- [Body embeddings](https://github.com/skysaksham/visiontrace/blob/main/pages/reid.py): `pages/reid.py`

### Footage and camera data

- [Target embeddings](https://github.com/skysaksham/visiontrace/blob/main/embeddings/target_body.npy): `embeddings/target_body.npy`
- [Camera topology](https://github.com/skysaksham/visiontrace/blob/main/camera_map.json): `camera_map.json`
- **Video files**

### Other components

- **Operator**

## Connections

- Operator → Application shell: uses
- Application shell → Home page: shows
- Application shell → Footage viewer: shows
- Application shell → Tracking page: shows
- Application shell → Camera map: shows
- Application shell → Fetch page: shows
- Application shell → Body search: shows
- Application shell → Face search: shows
- Application shell → Camera topology: loads
- Footage viewer → Video files: reads
- Camera map → Camera topology: reads
- Tracking page → Tracking workers: starts
- Tracking workers → Video files: processes
- Tracking workers → Camera topology: reads
- Video tracking → Body embeddings: extracts
- Video tracking → Target embeddings: reads
- Video tracking → Camera topology: reads
- Video tracking → Video files: processes
