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.
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.
Overview of the proposed workflow for generating fine-resolution wildfire fuel-type predictions from spatially coarse labels and multi-source remote sensing inputs.
- 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, analysis grid, and spatial distribution of the independent AWFIP field observations across Alberta, Canada.
| 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.
L2HFuelNet combines a Swin Transformer encoder with an ASPP-based convolutional encoder to capture long-range contextual dependencies and multi-scale local fuel patterns.
Wildfire-Fuel-Mapping/
├── configs/
├── docs/
│ └── assets/
├── examples/
├── notebooks/
├── scripts/
├── src/
├── tests/
├── CITATION.cff
├── environment.yml
├── LICENSE
├── requirements.txt
└── README.md
git clone https://github.com/EhAI4EO/Wildfire-Fuel-Mapping.git
cd Wildfire-Fuel-Mapping
conda env create -f environment.yml
conda activate l2hfuelnetAlternatively:
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.txtThe development notebook did not preserve a completely frozen software environment. See Reproducibility Notes before attempting exact numerical reproduction.
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.
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.
python scripts/train.py --config configs/default.yamlOptional overrides:
python scripts/train.py \
--config configs/default.yaml \
--train-dir path/to/training_patches \
--epochs 1000Detailed instructions are provided in Training.
python scripts/evaluate.py \
--config configs/default.yaml \
--weights path/to/model.weights.h5 \
--test-dir path/to/evaluation_patchesIndependent AWFIP observations used in the manuscript are not included in this repository.
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.tifThe 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.
python -m pytest tests/test_smoke.py -vThe 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.
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 under the common Alberta evaluation protocol. Detailed statistical results are reported in the associated manuscript.
Representative qualitative comparisons showing the spatial patterns recovered by L2HFuelNet in heterogeneous and fragmented fuel landscapes.
Province-wide nominal 10 m vegetation-based wildfire fuel-type map generated for Alberta, Canada.
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.
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
The source code is released under the MIT License. Third-party datasets remain subject to the terms specified by their original providers.
Questions and reproducibility issues may be submitted through the repository’s issue tracker.





