# akhilesh112606/multitemporal-satellite-cloud-removal architecture

> Architecture diagram of the GitHub repository akhilesh112606/multitemporal-satellite-cloud-removal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akhilesh112606/multitemporal-satellite-cloud-removal
- Repository: https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal

## Overview

This is a Streamlit application for multi-temporal Sentinel-2 cloud removal. Users upload a cloudy primary GeoTIFF, its cloud/shadow mask, and two contextual images with masks; the app validates and processes them, runs the trained model, then presents diagnostics and previews with a georeferenced download. A clear target can optionally be uploaded for per-image evaluation, and fixed held-out benchmark scores are also shown. The graph separates input handling, model inference, and results. Source excerpts are partial, so edges are limited to visible calls and README-documented capabilities.

Main entry points: [`app.py`](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py) (GeoTIFF processing), [`checkpoints/best_temporal_residual_unet_10d.pt`](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/checkpoints/best_temporal_residual_unet_10d.pt) (Trained weights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_upload_ui["Upload interface<br/>[app.py]"]
  node_result_view["Result previews<br/>[app.py]"]
end

subgraph group_inference["Input and inference"]
  node_input_processing["GeoTIFF processing<br/>[app.py]"]
  node_model_loader["Checkpoint loader<br/>[app.py]"]
  node_checkpoint["Trained weights"]
  node_temporal_unet["Temporal fusion U-Net<br/>[app.py]"]
end

subgraph group_results["Results and evaluation"]
  node_diagnostics["Input diagnostics<br/>[app.py]"]
  node_target_metrics["Target metrics<br/>[app.py]"]
  node_benchmark["Held-out benchmarks<br/>[app.py]"]
  node_geotiff_export["GeoTIFF export<br/>[app.py]"]
end

node_user(("Satellite analyst"))
node_user_result(("Analyst results"))

node_user -->|"uploads inputs"| node_upload_ui
node_upload_ui -->|"runs inference"| node_input_processing
node_input_processing -->|"loads model"| node_model_loader
node_model_loader -->|"loads weights"| node_checkpoint
node_input_processing -->|"runs prediction"| node_temporal_unet
node_input_processing -->|"computes diagnostics"| node_diagnostics
node_input_processing -->|"evaluates target"| node_target_metrics
node_input_processing -->|"exports prediction"| node_geotiff_export
node_benchmark -->|"shows scores"| node_result_view
node_diagnostics -->|"shows metrics"| node_result_view
node_target_metrics -->|"shows evaluation"| node_result_view
node_geotiff_export -->|"offers download"| node_result_view
node_result_view -->|"presents results"| node_user_result

click node_upload_ui "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_input_processing "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_model_loader "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_checkpoint "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/checkpoints/best_temporal_residual_unet_10d.pt"
click node_temporal_unet "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_diagnostics "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_target_metrics "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_benchmark "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_geotiff_export "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py"
click node_result_view "https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/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_ui,node_result_view toneBlue
class node_input_processing,node_model_loader,node_checkpoint,node_temporal_unet toneAmber
class node_diagnostics,node_target_metrics,node_benchmark,node_geotiff_export toneMint
class node_user,node_user_result toneIndigo
```

## Components

### User interface

- [Upload interface](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`
- [Result previews](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`

### Input and inference

- [GeoTIFF processing](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`
- [Checkpoint loader](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`
- [Trained weights](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/checkpoints/best_temporal_residual_unet_10d.pt): `checkpoints/best_temporal_residual_unet_10d.pt`
- [Temporal fusion U-Net](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`

### Results and evaluation

- [Input diagnostics](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`
- [Target metrics](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`
- [Held-out benchmarks](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`
- [GeoTIFF export](https://github.com/akhilesh112606/multitemporal-satellite-cloud-removal/blob/main/app.py): `app.py`

### Other components

- **Satellite analyst**
- **Analyst results**

## Connections

- Satellite analyst → Upload interface: uploads inputs (evidence: `README.md`)
- Upload interface → GeoTIFF processing: runs inference (evidence: `app.py`)
- GeoTIFF processing → Checkpoint loader: loads model (evidence: `app.py`)
- Checkpoint loader → Trained weights: loads weights (evidence: `app.py`)
- GeoTIFF processing → Temporal fusion U-Net: runs prediction (evidence: `app.py`)
- GeoTIFF processing → Input diagnostics: computes diagnostics (evidence: `app.py`)
- GeoTIFF processing → Target metrics: evaluates target (evidence: `app.py`)
- GeoTIFF processing → GeoTIFF export: exports prediction (evidence: `app.py`)
- Held-out benchmarks → Result previews: shows scores (evidence: `README.md`)
- Input diagnostics → Result previews: shows metrics (evidence: `app.py`)
- Target metrics → Result previews: shows evaluation (evidence: `README.md`)
- GeoTIFF export → Result previews: offers download (evidence: `README.md`)
- Result previews → Analyst results: presents results (evidence: `app.py`)
