# uchihadzoro/deep-learning-super-resolution-mapping architecture

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

- Interactive diagram: https://gitdiagram.com/uchihadzoro/deep-learning-super-resolution-mapping
- Repository: https://github.com/uchihadzoro/deep-learning-super-resolution-mapping

## Overview

TRINETRA-SR turns Sentinel-2 imagery into 2.5 m, 10-band outputs with per-pixel uncertainty and radiometric consistency metrics. Its main workflow selects or accepts imagery, runs super-resolution, validates and exports results, then presents them in a browser viewer. The README also documents browser-local inference and an optional server deployment. Browser-engine and viewer relationships below rely on README documentation because their source was not sampled; implementation details beyond that are not inferred.

Main entry points: [`server/app.py`](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/server/app.py) (Optional job API), [`docs/engine.js`](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/engine.js) (Browser engine), [`docs/js/app.js`](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/js/app.js) (Map and result viewer), [`prototype/run_sr.py`](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py) (Scene search and fetch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Imagery inputs"]
  node_upload["GeoTIFF upload<br/>[app.py]"]
  node_scene_fetch["Scene search and fetch<br/>[run_sr.py]"]
end

subgraph group_inference["Super-resolution"]
  node_browser_engine["Browser engine<br/>[engine.js]"]
  node_onnx_model["ONNX model<br/>[sen2sr_lite.onnx]"]
  node_model_export["ONNX model export<br/>[export_onnx.py]"]
  node_sr_model["SEN2SR-Lite inference<br/>[run_sr.py]"]
end

subgraph group_trust["Trust and outputs"]
  node_uncertainty["Ensemble uncertainty<br/>[run_sr.py]"]
  node_validation["Consistency metrics<br/>[run_sr.py]"]
  node_render_export["Assets and GeoTIFFs<br/>[run_sr.py]"]
  node_static_data[("Demo scene assets<br/>[index.json]")]
end

subgraph group_experience["Viewer and deployment"]
  node_web_viewer["Map and result viewer<br/>[app.js]"]
  node_globe["Globe interaction<br/>[globe.js]"]
  node_api["Optional job API<br/>[app.py]"]
end

node_user(("User"))
node_s2_archive[("Sentinel-2 archive")]
node_cloud_assets[("Sentinel-2 COGs")]

node_user -->|"chooses location"| node_web_viewer
node_user -->|"uploads imagery"| node_browser_engine
node_web_viewer -->|"uses map"| node_globe
node_web_viewer -->|"shows samples"| node_static_data
node_browser_engine -->|"searches scenes"| node_s2_archive
node_browser_engine -->|"reads windows"| node_cloud_assets
node_browser_engine -->|"runs inference"| node_onnx_model
node_browser_engine -->|"provides results"| node_web_viewer
node_model_export -->|"loads model"| node_sr_model
node_model_export -->|"exports model"| node_onnx_model
node_api -->|"fetches scenes"| node_scene_fetch
node_api -->|"runs inference"| node_sr_model
node_api -->|"computes ensemble"| node_uncertainty
node_api -->|"computes metrics"| node_validation
node_api -->|"exports results"| node_render_export
node_scene_fetch -->|"searches scenes"| node_s2_archive
node_scene_fetch -->|"reads bands"| node_cloud_assets
node_sr_model -->|"ensembles passes"| node_uncertainty
node_render_export -->|"computes metrics"| node_validation
node_render_export -->|"writes demo assets"| node_static_data
node_user -.->|"requests server run"| node_api
node_upload -->|"submits GeoTIFF"| node_api

click node_upload "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/server/app.py"
click node_scene_fetch "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py"
click node_browser_engine "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/engine.js"
click node_onnx_model "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/model/sen2sr_lite.onnx"
click node_model_export "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/export_onnx.py"
click node_sr_model "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py"
click node_uncertainty "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py"
click node_validation "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py"
click node_render_export "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py"
click node_static_data "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/data/index.json"
click node_web_viewer "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/js/app.js"
click node_globe "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/js/globe.js"
click node_api "https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/server/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_upload,node_scene_fetch,node_user toneBlue
class node_browser_engine,node_onnx_model,node_model_export,node_sr_model,node_s2_archive,node_cloud_assets toneAmber
class node_uncertainty,node_validation,node_render_export,node_static_data toneMint
class node_web_viewer,node_globe,node_api toneRose
```

## Components

### Imagery inputs

- [GeoTIFF upload](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/server/app.py): `server/app.py`
- [Scene search and fetch](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py): `prototype/run_sr.py`

### Super-resolution

- [Browser engine](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/engine.js): `docs/engine.js`
- [ONNX model](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/model/sen2sr_lite.onnx): `docs/model/sen2sr_lite.onnx`
- [ONNX model export](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/export_onnx.py): `prototype/export_onnx.py`
- [SEN2SR-Lite inference](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py): `prototype/run_sr.py`

### Trust and outputs

- [Ensemble uncertainty](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py): `prototype/run_sr.py`
- [Consistency metrics](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py): `prototype/run_sr.py`
- [Assets and GeoTIFFs](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/prototype/run_sr.py): `prototype/run_sr.py`
- [Demo scene assets](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/data/index.json): `docs/data/index.json`

### Viewer and deployment

- [Map and result viewer](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/js/app.js): `docs/js/app.js`
- [Globe interaction](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/docs/js/globe.js): `docs/js/globe.js`
- [Optional job API](https://github.com/uchihadzoro/deep-learning-super-resolution-mapping/blob/main/server/app.py): `server/app.py`

### Other components

- **User**
- **Sentinel-2 archive**
- **Sentinel-2 COGs**

## Connections

- User → Map and result viewer: chooses location (evidence: `README.md`)
- User → Browser engine: uploads imagery (evidence: `README.md`)
- Map and result viewer → Globe interaction: uses map (evidence: `README.md`)
- Map and result viewer → Demo scene assets: shows samples (evidence: `README.md`)
- Browser engine → Sentinel-2 archive: searches scenes (evidence: `README.md`)
- Browser engine → Sentinel-2 COGs: reads windows (evidence: `README.md`)
- Browser engine → ONNX model: runs inference (evidence: `README.md`)
- Browser engine → Map and result viewer: provides results (evidence: `README.md`)
- ONNX model export → SEN2SR-Lite inference: loads model (evidence: `prototype/export_onnx.py`)
- ONNX model export → ONNX model: exports model (evidence: `README.md`)
- Optional job API → Scene search and fetch: fetches scenes (evidence: `server/app.py`)
- Optional job API → SEN2SR-Lite inference: runs inference (evidence: `server/app.py`)
- Optional job API → Ensemble uncertainty: computes ensemble (evidence: `server/app.py`)
- Optional job API → Consistency metrics: computes metrics (evidence: `server/app.py`)
- Optional job API → Assets and GeoTIFFs: exports results (evidence: `server/app.py`)
- Scene search and fetch → Sentinel-2 archive: searches scenes (evidence: `prototype/run_sr.py`)
- Scene search and fetch → Sentinel-2 COGs: reads bands (evidence: `prototype/run_sr.py`)
- SEN2SR-Lite inference → Ensemble uncertainty: ensembles passes (evidence: `prototype/run_sr.py`)
- Assets and GeoTIFFs → Consistency metrics: computes metrics (evidence: `prototype/run_sr.py`)
- Assets and GeoTIFFs → Demo scene assets: writes demo assets (evidence: `prototype/run_sr.py`)
- User → Optional job API: requests server run (evidence: `README.md`)
- GeoTIFF upload → Optional job API: submits GeoTIFF (evidence: `server/app.py`)
