Skip to content

About

Official implementation of L2HFuelNet for weakly supervised fine-resolution wildfire fuel mapping from spatially coarse labels and multi-source remote sensing data.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

L2HFuelNet

Weakly Supervised Fine-Resolution Wildfire Fuel Mapping

Reference implementation of L2HFuelNet, a dual-encoder framework for generating nominal 10 m vegetation-based wildfire fuel-type predictions from spatially coarse 30 m supervisory labels and multi-source remote sensing data.

Python TensorFlow License: MIT Dataset DOI


Overview

L2HFuelNet addresses fine-resolution semantic mapping when dense fine-resolution annotations are unavailable. The framework receives nominal 10 m multi-source remote sensing inputs, while optimization is guided by spatially coarse 30 m fuel labels. Because a coarse label does not identify the class of each constituent fine-resolution pixel, the task is formulated as weakly supervised resolution-enhanced semantic segmentation.

The model combines:

  • a Swin Transformer encoder for long-range contextual dependencies;
  • an ASPP-based convolutional encoder for multi-scale local patterns;
  • a decoder that fuses complementary features from both encoder branches;
  • confidence-aware selection (CAS) of confident and vague prediction regions; and
  • a composite Low-to-High Fuel Loss (L2H-FL) containing weighted cross-entropy, soft IoU, and confidence–vague distance terms.

The associated province-wide Alberta map and supporting geospatial documentation are archived on Zenodo.

Framework overview

Overview of the L2HFuelNet wildfire fuel mapping framework

Overview of the proposed workflow for generating fine-resolution wildfire fuel-type predictions from spatially coarse labels and multi-source remote sensing inputs.

Highlights

  • Province-scale wildfire fuel mapping from spatially coarse supervision
  • Integrated Sentinel-2, Sentinel-1, and terrain information
  • Dual Transformer–CNN representation learning
  • Seven vegetation-based fuel categories at nominal 10 m resolution
  • Configurable training, evaluation, and patch-level inference workflows
  • Modular TensorFlow/Keras implementation with a synthetic smoke test

Study area

Study area and spatial distribution of reference observations across Alberta

Study area, analysis grid, and spatial distribution of the independent AWFIP field observations across Alberta, Canada.

Output classes

Raster code Fuel category
0 Spruce
1 Pine
2 Aspen
3 Grass
4 Non-fuel
5 Water
6 Mixedwood

These categories are vegetation-based fuel-type proxies. They do not preserve every subclass distinction in the operational Canadian Fire Behavior Prediction system, including the original conifer–deciduous proportions within Mixedwood subclasses.


Model architecture

Architecture of the proposed L2HFuelNet model

L2HFuelNet combines a Swin Transformer encoder with an ASPP-based convolutional encoder to capture long-range contextual dependencies and multi-scale local fuel patterns.

Repository structure

Wildfire-Fuel-Mapping/
├── configs/
├── docs/
│   └── assets/
├── examples/
├── notebooks/
├── scripts/
├── src/
├── tests/
├── CITATION.cff
├── environment.yml
├── LICENSE
├── requirements.txt
└── README.md

Installation

git clone https://github.com/EhAI4EO/Wildfire-Fuel-Mapping.git
cd Wildfire-Fuel-Mapping

conda env create -f environment.yml
conda activate l2hfuelnet

Alternatively:

python -m venv .venv

# Linux/macOS
source .venv/bin/activate

# Windows PowerShell
.\.venv\Scripts\Activate.ps1

python -m pip install --upgrade pip
pip install -r requirements.txt

The development notebook did not preserve a completely frozen software environment. See Reproducibility Notes before attempting exact numerical reproduction.

Input data

The default model input is a 256 × 256 × 27 patch composed of:

  • 10 Sentinel-2 multispectral bands;
  • 11 Sentinel-2-derived spectral indices;
  • Sentinel-1 VV, VH, and VV/VH information; and
  • elevation, slope, and aspect derived from the Canadian Digital Elevation Model.

Training labels are seven-class one-hot arrays derived from the spatially coarse 30 m NRCan fuel product. Remote sensing inputs were accessed and processed through Google Earth Engine. Raw third-party imagery, AWFIP observations, preprocessed patches, and trained weights are not redistributed in this code repository.

See Data Specification and Preprocessing.

Configuration

Edit configs/default.yaml and provide the prepared training directory:

data:
  train_dir: "path/to/training_patches"

Expected patch pairs:

Input_1.npz  → key "hr", shape (256, 256, 27)
Label_1.npz  → key "lr", shape (256, 256, 7)

The feature order and numerical preprocessing applied during inference must match those used to create the training patches.

Training

python scripts/train.py --config configs/default.yaml

Optional overrides:

python scripts/train.py \
  --config configs/default.yaml \
  --train-dir path/to/training_patches \
  --epochs 1000

Detailed instructions are provided in Training.

Evaluation

python scripts/evaluate.py \
  --config configs/default.yaml \
  --weights path/to/model.weights.h5 \
  --test-dir path/to/evaluation_patches

Independent AWFIP observations used in the manuscript are not included in this repository.

Inference

For a prepared 27-channel patch matching the configured dimensions:

python scripts/predict.py \
  --config configs/default.yaml \
  --weights path/to/model.weights.h5 \
  --input path/to/input_patch.tif \
  --output path/to/fuel_prediction.tif

The utility performs inference on an already prepared raster matching the configured input size and feature order. Province-scale mosaicking, overlap handling, normalization, and nodata processing remain data-specific workflow steps described in Inference.

Smoke test

python -m pytest tests/test_smoke.py -v

The test builds a reduced model, performs a synthetic forward pass, checks the output dimensions, and evaluates L2H-FL. It does not require the Alberta dataset.

Data and principal output

Dataset: Alberta 10 m Vegetation-Based Wildfire Fuel-Type Map and Supporting Geospatial Data
Version: 1.0.0
DOI: 10.5281/zenodo.21538644

The original supervisory labels can be obtained from the Canadian Wildland Fire Information System.

Quantitative comparison

Quantitative comparison of L2HFuelNet and the evaluated baseline models

Quantitative comparison under the common Alberta evaluation protocol. Detailed statistical results are reported in the associated manuscript.

Qualitative comparison

Representative qualitative comparison of wildfire fuel mapping results

Representative qualitative comparisons showing the spatial patterns recovered by L2HFuelNet in heterogeneous and fragmented fuel landscapes.

Province-wide fuel map

Nominal 10 m vegetation-based wildfire fuel-type map of Alberta

Province-wide nominal 10 m vegetation-based wildfire fuel-type map generated for Alberta, Canada.

Reproducibility scope

This repository provides the model architecture, manuscript-aligned loss implementation, configuration system, NPZ data loader, training entry point, evaluation utilities, patch-level inference wrapper, and synthetic smoke test. Exact numerical reproduction additionally requires the prepared input patches, experimental split, trained weights, and complete geospatial preprocessing workflow.

The modular implementation under src/ is the maintained reference implementation associated with the revised manuscript. Technical qualifications are summarized in Reproducibility Notes.

Citation

Please cite the accompanying manuscript and archived dataset. GitHub citation metadata are provided in CITATION.cff.

Khankeshizadeh, E., Mohammadzadeh, A., Marjani, M.,
Mahdianpari, M., Tahermanesh, S., and Jamali, S. (2026).
Alberta 10 m Vegetation-Based Wildfire Fuel-Type Map and
Supporting Geospatial Data (Version 1.0.0). Zenodo.
https://doi.org/10.5281/zenodo.21538644

License

The source code is released under the MIT License. Third-party datasets remain subject to the terms specified by their original providers.

Contact

Questions and reproducibility issues may be submitted through the repository’s issue tracker.

About

Official implementation of L2HFuelNet for weakly supervised fine-resolution wildfire fuel mapping from spatially coarse labels and multi-source remote sensing data.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages