This project fine-tunes models pre-trained on remote sensing data to perform wildfire area segmentation.
This repository contains code for retrieving satellite imagery, preprocessing data, and fine-tuning foundation models for burned area detection.
-
Data Examples: A small example dataset (20 samples) is provided to run through the notebooks and train models for a few epochs.

-
Data Acquisition: The retrieval process for the California Fire Perimeter Dataset and Harmonized Sentinel-2 MSI: MultiSpectral Instrument, Level-2A (SR) is documented in here.
-
Notebooks: The provided Jupyter notebooks offer detailed explanations and code for:
-
Retrieving data from GeoJSON and satellite imagery.
-
Data preprocessing (cloud masking, band selection).
-
Dataset preparation for deep learning.
-
Model training and evaluation.
- Training: Models were trained on GPU. The complete training scripts are located in the scripts folder. We fine-tuned models on both RGB and multi-spectral images for 30 epochs. Training logs are available in the logs folder.
git clone https://github.com/Runan-Duan/Wildfire_Detection.git
All required dependencies are listed in the environment.yml file. Create the Conda environment using:
conda env create -f environment.yml
conda activate wildfire-detection
To train a model on RGB images using the SwinB_RGB architecture:
python train.py --batch_size 16 --epochs 30 --num_data 400 --model "SwinB_RGB"
To train a model on multi-spectral images using the SwinB_MS architecture:
python train.py --batch_size 16 --epochs 30 --num_data 400 --model "SwinB_MS" --multispectral
Runan, Duan runan.duan@stud.uni-heidelberg.de Sam, Olinger S.Olinger@stud.uni-heidelberg.de
This project was inspired by the lecture "Geographic Applications of Machine Learning" at the Geographical Institute of the University of Heidelberg.