# beppemarnell/msc-thesis-wildfire-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/beppemarnell/msc-thesis-wildfire-prediction
- Repository: https://github.com/beppemarnell/msc-thesis-wildfire-prediction

## Overview

This repository is thesis research code for global wildfire-risk assessment from remote-sensing imagery. Its documented workflow extracts geospatial features with Google Earth Engine, preprocesses image samples, and uses a CNN to predict wildfire risk. The extraction script is excerpted; preprocessing and model details are documented in the README but their notebooks were not sampled, so those links reflect documented workflow rather than inspected calls.

Main entry points: [`src/gee_extraction.js`](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js) (Fire sampling), [`images`](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/tree/main/images) (Image samples), [`src/Data_processing.ipynb`](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Data_processing.ipynb) (Image preprocessing), [`src/Wildfires_assessent_keras.ipynb`](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Wildfires_assessent_keras.ipynb) (CNN training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extraction["Earth Engine Extraction"]
  node_configure["Region and dates<br/>[gee_extraction.js]"]
  node_fire["Fire sampling<br/>[gee_extraction.js]"]
  node_regions["Sample regions<br/>[gee_extraction.js]"]
  node_features["Feature stack<br/>[gee_extraction.js]"]
  node_export["GeoTIFF export<br/>[gee_extraction.js]"]
end

subgraph group_preparation["Data Preparation"]
  node_samples[("Image samples")]
  node_preprocess["Image preprocessing"]
end

subgraph group_model["Risk Modeling"]
  node_training["CNN training"]
  node_prediction["Wildfire risk prediction"]
end

node_researcher(("Researcher"))
node_gee["Earth Engine"]
node_imagery[("Remote-sensing catalogs")]

node_researcher -->|"sets region"| node_configure
node_configure -->|"sets dates"| node_fire
node_imagery -->|"provides fire data"| node_fire
node_imagery -->|"provides variables"| node_features
node_gee -->|"runs sampling"| node_fire
node_fire -->|"samples points"| node_regions
node_regions -->|"defines export areas"| node_features
node_features -->|"composes bands"| node_export
node_export -->|"exports GeoTIFF"| node_gee
node_export -.->|"produces images"| node_samples
node_samples -.->|"cleans and normalizes"| node_preprocess
node_preprocess -.->|"prepares training data"| node_training
node_training -.->|"predicts fire risk"| node_prediction
node_researcher -.->|"requests assessment"| node_prediction

click node_configure "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js"
click node_fire "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js"
click node_regions "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js"
click node_features "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js"
click node_export "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js"
click node_samples "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/tree/main/images"
click node_preprocess "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Data_processing.ipynb"
click node_training "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Wildfires_assessent_keras.ipynb"
click node_prediction "https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Wildfires_assessent_keras.ipynb"

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_configure,node_fire,node_regions,node_features,node_export toneBlue
class node_samples,node_preprocess,node_imagery toneAmber
class node_training,node_prediction toneMint
class node_researcher,node_gee toneIndigo
```

## Components

### Earth Engine Extraction

- [Region and dates](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js): `src/gee_extraction.js`
- [Fire sampling](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js): `src/gee_extraction.js`
- [Sample regions](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js): `src/gee_extraction.js`
- [Feature stack](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js): `src/gee_extraction.js`
- [GeoTIFF export](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/gee_extraction.js): `src/gee_extraction.js`

### Data Preparation

- [Image samples](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/tree/main/images): `images`
- [Image preprocessing](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Data_processing.ipynb): `src/Data_processing.ipynb`

### Risk Modeling

- [CNN training](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Wildfires_assessent_keras.ipynb): `src/Wildfires_assessent_keras.ipynb`
- [Wildfire risk prediction](https://github.com/beppemarnell/msc-thesis-wildfire-prediction/blob/main/src/Wildfires_assessent_keras.ipynb): `src/Wildfires_assessent_keras.ipynb`

### Other components

- **Researcher**
- **Earth Engine**
- **Remote-sensing catalogs**

## Connections

- Researcher → Region and dates: sets region (evidence: `src/gee_extraction.js`)
- Region and dates → Fire sampling: sets dates (evidence: `src/gee_extraction.js`)
- Remote-sensing catalogs → Fire sampling: provides fire data (evidence: `src/gee_extraction.js`)
- Remote-sensing catalogs → Feature stack: provides variables (evidence: `src/gee_extraction.js`)
- Earth Engine → Fire sampling: runs sampling (evidence: `src/gee_extraction.js`)
- Fire sampling → Sample regions: samples points (evidence: `src/gee_extraction.js`)
- Sample regions → Feature stack: defines export areas (evidence: `src/gee_extraction.js`)
- Feature stack → GeoTIFF export: composes bands (evidence: `src/gee_extraction.js`)
- GeoTIFF export → Earth Engine: exports GeoTIFF (evidence: `src/gee_extraction.js`)
- GeoTIFF export → Image samples: produces images (evidence: `README.md`)
- Image samples → Image preprocessing: cleans and normalizes (evidence: `README.md`)
- Image preprocessing → CNN training: prepares training data (evidence: `README.md`)
- CNN training → Wildfire risk prediction: predicts fire risk (evidence: `README.md`)
- Researcher → Wildfire risk prediction: requests assessment (evidence: `README.md`)
