# venu-822006/multimodal-ai architecture

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

- Interactive diagram: https://gitdiagram.com/venu-822006/multimodal-ai
- Repository: https://github.com/venu-822006/multimodal-ai

## Overview

FloodSight AI is an educational flood-mapping and impact-analysis prototype. Its main user workflow supplies prepared Sentinel-1 scenes and an area/date to the worker, which searches satellite metadata, predicts a flood mask, optionally adds debris and Sentinel-2 checks, analyzes OSM exposure and road connectivity, and generates reports. A separate training and evaluation workflow supports the segmentation model. Raw satellite-product download and calibration are explicitly outside the current scope; worker-to-module links are supported by the worker’s indexed references, while some detailed runtime sequencing is not visible in the excerpts.

Main entry points: [`worker.py`](https://github.com/venu-822006/multimodal-ai/blob/main/worker.py) (Job Worker), [`run_pipeline.py`](https://github.com/venu-822006/multimodal-ai/blob/main/run_pipeline.py) (Training Pipeline), [`train.py`](https://github.com/venu-822006/multimodal-ai/blob/main/train.py) (Model Training), [`predict.py`](https://github.com/venu-822006/multimodal-ai/blob/main/predict.py) (Flood Prediction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_model["Data and Model"]
  node_stac["STAC Search<br/>[stac_search.py]"]
  node_preprocess["Scene Preparation<br/>[preprocess.py]"]
  node_dataset["Training Dataset<br/>[dataset.py]"]
  node_train["Model Training<br/>[train.py]"]
  node_unet["U-Net Model<br/>[model.py]"]
end

subgraph group_analysis["Flood Analysis"]
  node_worker["Job Worker<br/>[worker.py]"]
  node_predict["Flood Prediction<br/>[predict.py]"]
  node_baseline["Baseline Mapping<br/>[baseline.py]"]
  node_debris["Debris Detection<br/>[debris.py]"]
  node_optical["Optical Verification"]
end

subgraph group_impact["Impact Assessment"]
  node_damage["Exposure Analysis<br/>[damage_analysis.py]"]
  node_connectivity["Road Connectivity"]
end

subgraph group_outputs["Reporting and Evaluation"]
  node_report["Situation Report<br/>[generate_report.py]"]
  node_dashboard["Map Dashboard"]
  node_evaluate["Model Evaluation<br/>[evaluate.py]"]
  node_case_eval["EMSR927 Check"]
  node_himalayan["Holdout Evaluation"]
  node_run_pipeline["Training Pipeline<br/>[run_pipeline.py]"]
end

node_user(("Analyst"))
node_copernicus["Copernicus STAC"]
node_osm["ohsome OSM"]

node_user -->|"submits job"| node_worker
node_worker -->|"searches metadata"| node_stac
node_stac -->|"queries catalog"| node_copernicus
node_worker -->|"fetches snapshot"| node_osm
node_worker -.->|"prepares scenes"| node_preprocess
node_worker -->|"runs inference"| node_predict
node_predict -->|"loads model"| node_unet
node_train -->|"loads samples"| node_dataset
node_train -->|"trains model"| node_unet
node_run_pipeline -->|"runs training"| node_train
node_run_pipeline -->|"runs inference"| node_predict
node_run_pipeline -->|"evaluates results"| node_evaluate
node_worker -->|"analyzes change"| node_debris
node_worker -->|"checks Sentinel-2"| node_optical
node_worker -->|"analyzes exposure"| node_damage
node_worker -->|"analyzes access"| node_connectivity
node_worker -->|"generates report"| node_report
node_worker -->|"generates dashboard"| node_dashboard
node_user -->|"requests reference check"| node_case_eval
node_user -->|"requests holdout report"| node_himalayan
node_himalayan -->|"uses metrics"| node_evaluate
node_user -.->|"may select baseline"| node_baseline

click node_worker "https://github.com/venu-822006/multimodal-ai/blob/main/worker.py"
click node_stac "https://github.com/venu-822006/multimodal-ai/blob/main/stac_search.py"
click node_preprocess "https://github.com/venu-822006/multimodal-ai/blob/main/preprocess.py"
click node_dataset "https://github.com/venu-822006/multimodal-ai/blob/main/dataset.py"
click node_train "https://github.com/venu-822006/multimodal-ai/blob/main/train.py"
click node_unet "https://github.com/venu-822006/multimodal-ai/blob/main/model.py"
click node_predict "https://github.com/venu-822006/multimodal-ai/blob/main/predict.py"
click node_baseline "https://github.com/venu-822006/multimodal-ai/blob/main/baseline.py"
click node_debris "https://github.com/venu-822006/multimodal-ai/blob/main/debris.py"
click node_optical "https://github.com/venu-822006/multimodal-ai/blob/main/optical_analysis.py"
click node_damage "https://github.com/venu-822006/multimodal-ai/blob/main/damage_analysis.py"
click node_connectivity "https://github.com/venu-822006/multimodal-ai/blob/main/connectivity_analysis.py"
click node_report "https://github.com/venu-822006/multimodal-ai/blob/main/generate_report.py"
click node_dashboard "https://github.com/venu-822006/multimodal-ai/blob/main/generate_dashboard.py"
click node_evaluate "https://github.com/venu-822006/multimodal-ai/blob/main/evaluate.py"
click node_case_eval "https://github.com/venu-822006/multimodal-ai/blob/main/case_study_emsr927.py"
click node_himalayan "https://github.com/venu-822006/multimodal-ai/blob/main/evaluate_himalayan.py"
click node_run_pipeline "https://github.com/venu-822006/multimodal-ai/blob/main/run_pipeline.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_stac,node_preprocess,node_dataset,node_train,node_unet toneBlue
class node_worker,node_predict,node_baseline,node_debris,node_optical toneAmber
class node_damage,node_connectivity toneMint
class node_report,node_dashboard,node_evaluate,node_case_eval,node_himalayan,node_run_pipeline toneRose
class node_user,node_copernicus,node_osm toneIndigo
```

## Components

### Data and Model

- [STAC Search](https://github.com/venu-822006/multimodal-ai/blob/main/stac_search.py): `stac_search.py`
- [Scene Preparation](https://github.com/venu-822006/multimodal-ai/blob/main/preprocess.py): `preprocess.py`
- [Training Dataset](https://github.com/venu-822006/multimodal-ai/blob/main/dataset.py): `dataset.py`
- [Model Training](https://github.com/venu-822006/multimodal-ai/blob/main/train.py): `train.py`
- [U-Net Model](https://github.com/venu-822006/multimodal-ai/blob/main/model.py): `model.py`

### Flood Analysis

- [Job Worker](https://github.com/venu-822006/multimodal-ai/blob/main/worker.py): `worker.py`
- [Flood Prediction](https://github.com/venu-822006/multimodal-ai/blob/main/predict.py): `predict.py`
- [Baseline Mapping](https://github.com/venu-822006/multimodal-ai/blob/main/baseline.py): `baseline.py`
- [Debris Detection](https://github.com/venu-822006/multimodal-ai/blob/main/debris.py): `debris.py`
- [Optical Verification](https://github.com/venu-822006/multimodal-ai/blob/main/optical_analysis.py): `optical_analysis.py`

### Impact Assessment

- [Exposure Analysis](https://github.com/venu-822006/multimodal-ai/blob/main/damage_analysis.py): `damage_analysis.py`
- [Road Connectivity](https://github.com/venu-822006/multimodal-ai/blob/main/connectivity_analysis.py): `connectivity_analysis.py`

### Reporting and Evaluation

- [Situation Report](https://github.com/venu-822006/multimodal-ai/blob/main/generate_report.py): `generate_report.py`
- [Map Dashboard](https://github.com/venu-822006/multimodal-ai/blob/main/generate_dashboard.py): `generate_dashboard.py`
- [Model Evaluation](https://github.com/venu-822006/multimodal-ai/blob/main/evaluate.py): `evaluate.py`
- [EMSR927 Check](https://github.com/venu-822006/multimodal-ai/blob/main/case_study_emsr927.py): `case_study_emsr927.py`
- [Holdout Evaluation](https://github.com/venu-822006/multimodal-ai/blob/main/evaluate_himalayan.py): `evaluate_himalayan.py`
- [Training Pipeline](https://github.com/venu-822006/multimodal-ai/blob/main/run_pipeline.py): `run_pipeline.py`

### Other components

- **Analyst**
- **Copernicus STAC**
- **ohsome OSM**

## Connections

- Analyst → Job Worker: submits job (evidence: `README.md`)
- Job Worker → STAC Search: searches metadata (evidence: `worker.py`)
- STAC Search → Copernicus STAC: queries catalog (evidence: `README.md`)
- Job Worker → ohsome OSM: fetches snapshot (evidence: `worker.py`)
- Job Worker → Scene Preparation: prepares scenes
- Job Worker → Flood Prediction: runs inference (evidence: `worker.py`)
- Flood Prediction → U-Net Model: loads model (evidence: `predict.py`)
- Model Training → Training Dataset: loads samples (evidence: `train.py`)
- Model Training → U-Net Model: trains model (evidence: `train.py`)
- Training Pipeline → Model Training: runs training (evidence: `README.md`)
- Training Pipeline → Flood Prediction: runs inference (evidence: `README.md`)
- Training Pipeline → Model Evaluation: evaluates results (evidence: `README.md`)
- Job Worker → Debris Detection: analyzes change (evidence: `worker.py`)
- Job Worker → Optical Verification: checks Sentinel-2 (evidence: `worker.py`)
- Job Worker → Exposure Analysis: analyzes exposure (evidence: `worker.py`)
- Job Worker → Road Connectivity: analyzes access (evidence: `worker.py`)
- Job Worker → Situation Report: generates report (evidence: `worker.py`)
- Job Worker → Map Dashboard: generates dashboard (evidence: `worker.py`)
- Analyst → EMSR927 Check: requests reference check (evidence: `README.md`)
- Analyst → Holdout Evaluation: requests holdout report (evidence: `README.md`)
- Holdout Evaluation → Model Evaluation: uses metrics (evidence: `evaluate_himalayan.py`)
- Analyst → Baseline Mapping: may select baseline
