Fine-tuning NASA/IBM's Prithvi geospatial foundation model to map wildfire burn intensity (5 severity grades) from Harmonized Landsat Sentinel-2 (HLS) satellite imagery, and comparing several segmentation decoders against Prithvi's binary Burn Scar model.
Urban Computing project, Leiden University (2025), by Priyanjali Goel and Maria Kapusheva (equal contribution).
True colour (R, G, B) vs false colour (NIR, SWIR1, SWIR2). In the false-colour composite the burn scar stands out in blue.
- Turned Prithvi from binary burn-scar detection into multi-class burn-intensity segmentation (grades 0–4, from unburned to severely burned).
- Compared four decoders on a pretrained Prithvi backbone: FCN, UPerNet (with and without input normalisation) and DeepLabV3.
- The best model, UPerNet with normalised inputs, reaches F1 0.59 and accuracy 0.59, against F1 0.26 for the Burn Scar baseline. That is a ΔAccuracy of +0.22 over the baseline.
- Built an end-to-end pipeline: HLS data preparation, an 80/10/10 split, fine-tuning with TerraTorch and Lightning, and evaluation and visualisation.
Existing burned-area methods say where a fire burned, not how badly. Burn intensity is what forest managers need to plan recovery. The research question:
Can the geospatial foundation model Prithvi be fine-tuned to map burn intensity accurately from satellite imagery?
Improvement is measured relative to the binary baseline:
ΔAccuracy = Accuracy(burn intensity model) − Accuracy(burn scar baseline)
- Source:
ibm-nasa-geospatial/burn_intensity. Only the post-fire scenes (post.zip) are used. - Input: HLS tiles with 6 spectral bands: Blue, Green, Red, Narrow NIR, SWIR1, SWIR2. SWIR bands see through thin smoke and are sensitive to moisture and soil, which is key for separating burn severity.
- Labels: a single-band grading mask with values 0 (unburned) to 4 (severely burned). Unlabelled pixels are set to
-1. - Split: 296 image–mask pairs, split 80 / 10 / 10: 237 train, 30 validation, 29 test. See
burn_intensity_final_dataset.py.
| Component | Setting |
|---|---|
| Backbone | Pretrained Prithvi: 100M parameters (FCN run), 300M (UPerNet / DeepLabV3 runs) |
| Decoders | FCN (128 channels), UPerNet (512 channels, ± input normalisation), DeepLabV3 (normalised inputs) |
| Task | Semantic segmentation, 5 burn-severity classes |
| Loss | Cross-entropy with class weights, normalised to sum to 1, to counter class imbalance |
| Data module | TerraTorch GenericNonGeoSegmentationDataModule, batch size 8 |
| Training | 80 epochs, validation every 10 epochs, AdamW (weight decay 0.05), T4 GPU |
| Monitoring | TensorBoard logger, early stopping and checkpoint callbacks |
Baseline: Prithvi's pretrained Burn Scar model, which is binary. To compare it fairly, the intensity test masks were binarised: grades 1–4 become burned (1) and 0 stays unburned.
Why these decoders:
- UPerNet combines a Pyramid Pooling Module and a Feature Pyramid Network for multi-scale context.
- DeepLabV3 uses atrous convolutions and ASPP to keep fine detail without heavy downsampling.
- FCN is the simplest upsampling decoder and serves as a reference point.
| FCN decoder | UPerNet (no norm) | UPerNet (norm) | DeepLabV3 | Burn Scar baseline | |
|---|---|---|---|---|---|
| F1 score | 0.38 | 0.48 | 0.59 | 0.58 | 0.26 |
| Accuracy | 0.38 | 0.48 | 0.59 | 0.58 | 0.37 |
| ΔAccuracy vs baseline | 0.01 | 0.11 | 0.22 | 0.21 | – |
- FCN: almost no structure. Plain transposed-convolution upsampling without multi-scale aggregation can't separate the burn grades.
- UPerNet without normalisation: recovers large spatial regions but confuses the grades.
- DeepLabV3: strong scores (0.58), but over-predicts grade 1 and needs sharper boundaries.
UPerNet with normalised inputs gives the most accurate grade-1 boundaries and a reasonable spread of the other grades. The binary Burn Scar model misses most of the burned area in this scene.
- Foundation models like Prithvi can learn the spectral signature of burn severity, not just burned vs unburned.
- Input normalisation and a multi-scale decoder (UPerNet) matter most: they account for +0.11 F1 over UPerNet without normalisation.
- Accuracy is still moderate (~0.6), so the models aren't ready for operational use. Next steps:
- more training data
- adding pre-fire and temporal scenes
- further decoder and architecture changes
- Engineering lesson: Prithvi's tooling changed fast. MMEngine-based versions broke, so the pipeline was moved to IBM's TerraTorch fine-tuning stack.
final_codes_dataset_arch_results/
├── burn_intensity_final_dataset.py # organise post.zip into train/val/test images & labels
├── results_with_UperNet_FCN.ipynb # FCN and UPerNet (± normalisation) fine-tuning + evaluation
├── results_with_deeplabv3.ipynb # DeepLabV3 decoder fine-tuning + evaluation
└── results_with_baseline.ipynb # Prithvi Burn Scar baseline on binarised test masks
exploration_data_models/ # early experiments: band exploration, MMSeg-based Prithvi setup, inference
docs/images/ # figures used in this README
BurnAreaSegmentation_Report.pdf # full project report
pip install terratorch lightning rioxarray rasterio torchmetrics scikit-image gradio_client- Download
post.zipfrom the burn_intensity dataset and setsource_dir/base_dirinburn_intensity_final_dataset.py. - Run the script to create the train/validation/test folders, or use the ready-made split below.
- Open the notebooks in
final_codes_dataset_arch_results/. A GPU (for example a Colab T4) is recommended.
- Train/test/validation split of the burn intensity data: burn-data-seg
- Binarised ground truth for the Burn Scar baseline: ground-truth-mask-burn-seg
- Burn Scar baseline predicted masks: evaluated-mask-burn-seg
Python · PyTorch · Lightning · TerraTorch · Prithvi (IBM/NASA) · rioxarray / rasterio · scikit-learn · matplotlib
- Jakubik et al. (2023). Foundation Models for Generalist Geospatial Artificial Intelligence (Prithvi). arXiv:2310.18660
- Xiao et al. (2018). Unified Perceptual Parsing for Scene Understanding (UPerNet). ECCV
- Chen et al. (2017). Rethinking Atrous Convolution for Semantic Image Segmentation (DeepLabV3). arXiv:1706.05587
- Pinto et al. (2021). A practical method for high-resolution burned area monitoring using Sentinel-2 and VIIRS. Remote Sensing
Priyanjali Goel and Maria Kapusheva, MSc AI, Leiden University. Original repository: MariaKapusheva/BurnedAreaMapping.


