license: apache-2.0
language:
- en
tags:
- Pytorch
- mmsegmentation
- segmentation
- burn scars
- Geospatial
- Foundation model
datasets:
- ibm-nasa-geospatial/hls_burn_scars
metrics:
- accuracy
- IoU
- F1 Score
Model and Inputs
The pretrained Prithvi-100m parameter model is used for finetuning over the Burn Scar task on HLS data. The finetuning expected an input tile of 512x512x6, where 512 is the height and width and 6 is the number of bands. The bands are
- Blue
- Green
- Red
- Narrow NIR
- SWIR 1
- SWIR 2
Code
Code for Finetuning is available through github
Configuration used for finetuning is available through config
To run inference, first install dependencies
mamba create -n prithvi-burn-scar python=3.10 pycocotools ncurses
mamba activate prithvi-burn-scar
pip install --upgrade pip && \
pip install -r requirements.txt && \
mim install mmcv-full==1.5.0
Instructions for downloading from HuggingFace datasets
Create account on https://huggingface.co/join
Install
git
following https://git-scm.com/downloadsInstall git-lfs with
sudo apt install git-lfs
andgit lfs install
Run the following command to download the HLS datasets. You may need to enter your HuggingFace username/password to do the
git clone
.mkdir -p data cd data/ git clone https://huggingface.co/datasets/ibm-nasa-geospatial/hls_burn_scars burn_scars tar -xzvf burn_scars/hls_burn_scars.tar.gz -C ./
With the datasets and the environment, you can now run the inference script.
python burn_scar_batch_inference_script.py \
-config burn_scars_Prithvi_100M.py \
-ckpt burn_scars_Prithvi_100M.pth \
-input data/burn_scars/validation \
-output data/burn_scars/inference_output \
-input_type tif