Python-Dfc2022 baseline: A simple baseline for the 2022 IEEE GRSS Data Fusion Contest (DFC2022)

DFC2022 Baseline

A simple baseline for the 2022 IEEE GRSS Data Fusion Contest (DFC2022)

This repository uses TorchGeo, PyTorch Lightning, and Segmentation Models PyTorch to train a U-Net to perform semantic segmentation on the DFC2022 dataset. Masks for the holdout set are then predicted and zipped to be submitted. Note that the the baseline is only trained on the small labeled train set containing imagery from the Nice and Nantes Saint-Nazaire regions.

Install packages

pip install -r requirements.txt

Dataset

The dataset can be downloaded at the DFC2022 IEEE DataPort page and unzipped into a root folder. In our case this is data/.

Train

python train.py --config_file conf/dfc2022.yaml

Predict

python predict.py --log_dir checkpoints/version_0/ --predict_on val --output_directory outputs --device cuda
cd outputs && zip -r submission.zip ./

Submit

Upload submission.zip to the evaluation server here. This baseline results in a mIoU of 0.1278 on the heldout validation set and as of 1/12/22 is 3rd place on the leaderboard.

Checkpoints

Checkpoints can be downloaded from the following link

Comments

  • Preds is Nan
    Preds is Nan

    Jan 17, 2022

    Hello, I have runned baseline in my loacl, but found the output of model is nan. Have you encountered this problem? Is it possible that there is a operating system or environmental problem?

    Before this line, print the preds get nan.

    https://github.com/isaaccorley/dfc2022-baseline/blob/d01e78ee0efd2d286e67a28dff4b506a50b3e897/src/trainer.py#L19

    Reply