# sarfaraz7608/disastersight architecture

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

- Interactive diagram: https://gitdiagram.com/sarfaraz7608/disastersight
- Repository: https://github.com/sarfaraz7608/disastersight

## Overview

DisasterSight is a local dashboard for turning recorded aerial search footage into approximate, prioritised rescue candidates for human review. The main workflow accepts video and flight telemetry, samples frames, detects and suppresses duplicate or vehicle-overlapping boxes, associates repeated observations, projects confirmed candidates to approximate GPS coordinates, and presents evidence and triage results for map review or GeoJSON export. The app and utility modules are excerpted; other interface details are grounded in the README, not independently inspected. Locations and priorities are recommendations, not dispatch decisions.

Main entry points: [`app.py`](https://github.com/sarfaraz7608/disastersight/blob/main/app.py) (Video workflow), [`utils/detection.py`](https://github.com/sarfaraz7608/disastersight/blob/main/utils/detection.py) (Detector fusion), [`utils/tracking.py`](https://github.com/sarfaraz7608/disastersight/blob/main/utils/tracking.py) (Identity and confirmation), [`utils/triage.py`](https://github.com/sarfaraz7608/disastersight/blob/main/utils/triage.py) (Priority scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Responder interface"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
end

subgraph group_analysis["Footage analysis"]
  node_video_workflow["Video workflow<br/>[app.py]"]
  node_detector_suite["Detector fusion<br/>[detection.py]"]
  node_vehicle_filter["Vehicle suppression<br/>[detection.py]"]
end

subgraph group_candidates["Candidate processing"]
  node_candidate_manager["Identity and confirmation<br/>[tracking.py]"]
  node_geo_projection["GPS projection<br/>[geolocation.py]"]
  node_evidence_capture["Evidence crops<br/>[app.py]"]
end

subgraph group_review["Review and export"]
  node_priority_scoring["Priority scoring<br/>[triage.py]"]
  node_map_view["Candidate map<br/>[app.py]"]
  node_candidate_review["Candidate review<br/>[app.py]"]
  node_geojson_export["GeoJSON export<br/>[triage.py]"]
end

node_responder(("Responder"))
node_footage["Recorded footage"]
node_telemetry["Flight telemetry"]

node_responder -->|"uses"| node_dashboard
node_footage -->|"uploads"| node_video_workflow
node_telemetry -->|"enters"| node_video_workflow
node_dashboard -->|"starts analysis"| node_video_workflow
node_video_workflow -->|"processes frames"| node_detector_suite
node_detector_suite -->|"suppresses vehicles"| node_vehicle_filter
node_video_workflow -->|"projects boxes"| node_geo_projection
node_video_workflow -->|"crops detections"| node_evidence_capture
node_video_workflow -->|"updates candidates"| node_candidate_manager
node_candidate_manager -->|"scores candidates"| node_priority_scoring
node_dashboard -->|"renders locations"| node_map_view
node_dashboard -->|"shows evidence"| node_candidate_review
node_dashboard -->|"exports candidates"| node_geojson_export
node_priority_scoring -->|"provides priority"| node_candidate_review

click node_dashboard "https://github.com/sarfaraz7608/disastersight/blob/main/app.py"
click node_video_workflow "https://github.com/sarfaraz7608/disastersight/blob/main/app.py"
click node_detector_suite "https://github.com/sarfaraz7608/disastersight/blob/main/utils/detection.py"
click node_vehicle_filter "https://github.com/sarfaraz7608/disastersight/blob/main/utils/detection.py"
click node_candidate_manager "https://github.com/sarfaraz7608/disastersight/blob/main/utils/tracking.py"
click node_geo_projection "https://github.com/sarfaraz7608/disastersight/blob/main/utils/geolocation.py"
click node_evidence_capture "https://github.com/sarfaraz7608/disastersight/blob/main/app.py"
click node_priority_scoring "https://github.com/sarfaraz7608/disastersight/blob/main/utils/triage.py"
click node_map_view "https://github.com/sarfaraz7608/disastersight/blob/main/app.py"
click node_candidate_review "https://github.com/sarfaraz7608/disastersight/blob/main/app.py"
click node_geojson_export "https://github.com/sarfaraz7608/disastersight/blob/main/utils/triage.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_dashboard toneBlue
class node_video_workflow,node_detector_suite,node_vehicle_filter toneAmber
class node_candidate_manager,node_geo_projection,node_evidence_capture toneMint
class node_priority_scoring,node_map_view,node_candidate_review,node_geojson_export toneRose
class node_responder,node_footage,node_telemetry toneIndigo
```

## Components

### Responder interface

- [Streamlit dashboard](https://github.com/sarfaraz7608/disastersight/blob/main/app.py): `app.py`

### Footage analysis

- [Video workflow](https://github.com/sarfaraz7608/disastersight/blob/main/app.py): `app.py`
- [Detector fusion](https://github.com/sarfaraz7608/disastersight/blob/main/utils/detection.py): `utils/detection.py`
- [Vehicle suppression](https://github.com/sarfaraz7608/disastersight/blob/main/utils/detection.py): `utils/detection.py`

### Candidate processing

- [Identity and confirmation](https://github.com/sarfaraz7608/disastersight/blob/main/utils/tracking.py): `utils/tracking.py`
- [GPS projection](https://github.com/sarfaraz7608/disastersight/blob/main/utils/geolocation.py): `utils/geolocation.py`
- [Evidence crops](https://github.com/sarfaraz7608/disastersight/blob/main/app.py): `app.py`

### Review and export

- [Priority scoring](https://github.com/sarfaraz7608/disastersight/blob/main/utils/triage.py): `utils/triage.py`
- [Candidate map](https://github.com/sarfaraz7608/disastersight/blob/main/app.py): `app.py`
- [Candidate review](https://github.com/sarfaraz7608/disastersight/blob/main/app.py): `app.py`
- [GeoJSON export](https://github.com/sarfaraz7608/disastersight/blob/main/utils/triage.py): `utils/triage.py`

### Other components

- **Responder**
- **Recorded footage**
- **Flight telemetry**

## Connections

- Responder → Streamlit dashboard: uses (evidence: `README.md`)
- Recorded footage → Video workflow: uploads (evidence: `README.md`)
- Flight telemetry → Video workflow: enters (evidence: `README.md`)
- Streamlit dashboard → Video workflow: starts analysis (evidence: `app.py`)
- Video workflow → Detector fusion: processes frames (evidence: `app.py`)
- Detector fusion → Vehicle suppression: suppresses vehicles (evidence: `utils/detection.py`)
- Video workflow → GPS projection: projects boxes (evidence: `app.py`)
- Video workflow → Evidence crops: crops detections (evidence: `app.py`)
- Video workflow → Identity and confirmation: updates candidates (evidence: `app.py`)
- Identity and confirmation → Priority scoring: scores candidates (evidence: `utils/tracking.py`)
- Streamlit dashboard → Candidate map: renders locations (evidence: `app.py`)
- Streamlit dashboard → Candidate review: shows evidence (evidence: `app.py`)
- Streamlit dashboard → GeoJSON export: exports candidates (evidence: `app.py`)
- Priority scoring → Candidate review: provides priority (evidence: `app.py`)
