Giter Site home page Giter Site logo

solcummings / earthvision2021-weakly-supervised Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 3.0 6.23 MB

1st Place Solution for the EARTHVISION 2021 DynamicEarthNet Challenge - Weakly-Supervised Multi-Class Change Detection Track at CVPRW 2021

License: Apache License 2.0

Python 97.92% Shell 2.08%
change-detection deep-learning pytorch semantic-segmentation siamese-neural-network remote-sensing

earthvision2021-weakly-supervised's Introduction

Siamese Attention U-Net for Multi-Class Change Detection

1st place solution for the EARTHVISION 2021 DynamicEarthNet Challenge - Weakly-Supervised Multi-Class Change Detection Track at CVPRW 2021
[Challenge Site] [Presentation Slides] [Presentation Video] [Dataset]

Overview

This work introduces a pixel-wise change detection network named Siamese Attention U-Net that incorporates attention mechanisms in the Siamese U-Net architecture. Experiments show the architectural change alongside training strategies such as semi-supervised learning produce more robust models.
Siamese Attention U-Net

Results

  1. Attention block
    Proposed Attention Block

When training the model with Jaccard loss, attending the up-sampled features improves mean IoU scores whereas attending skipped features - originally proposed in Attention UNet - do not. The improvement implies a need for prioritizing information in the coarser resolution features.

Attended features mean IoU (val)
None 0.2635
Skipped features 0.2603
Up-sampled features 0.2658
  1. Loss function

Jaccard loss and Dice loss optimize for different metrics, producing slightly varying results. Ensembling models trained exclusively on each loss function improves scores.

Loss function mean IoU (val)
Jaccard 0.2658
Dice 0.2668
Ensemble 0.2676
  1. Semi-supervised learning

Creating hard pseudo labels for the public validation and test dataset, then retraining the model alongside the original training dataset improves scores regardless of loss function. The ensemble of models trained on each loss function is submitted to the public test benchmark.

Pseudo labels Loss function mean IoU (val) mean IoU (test)
None Jaccard 0.2658
val+test Jaccard 0.2669
None Dice 0.2668
val+test Dice 0.2674
None Ensemble 0.2676
val+test Ensemble 0.2684 0.2423

Usage

Dependencies

  • gdal
  • numpy
  • pandas
  • pillow
  • pytorch
  • pyyaml
  • torchvision
  • tqdm

Downloading and Preprocessing Data

# assumes all data is unzipped to ./earthvision2021/data/source/
cd ./setup/
# convert data and organize directories
bash setup.bash
cd ./earthvision2021/preprocessing/
# create csv file that determines crop regions for training
python crop.py
mv train.csv ../data/train/random_128_binary_attempts128.csv

Training

cd ./earthvision2021/
# train model according to configurations in ./earthvision2021/config_train.yml
python train.py

Predicting

cd ./earthvision2021/
# predict using model according to configurations in ./earthvision2021/config_predict.yml
python predict.py

Pseudo Labelling

cd ./earthvision2021/postprocessing/
# binarizing prediction results to create hard pseudo labels
python label_binarize.py --in_dir ${prediction_dir}
cd ../preprocessing/
# create new csv file of crop regions
python crop.py --subset_file ${filename_text_file}
mv train.csv ../data/train/${csv_file}
# change "aoi_file" in ../config_train.yml to ${csv_file} and retrain

Postprocessing

cd ./earthvision2021/postprocessing/
# ensemble multiple predictions results
python ensemble.py --in_dir_list ${prediction_dir} ...
# binarize prediction results
python binarize.py --in_dir ${prediction_dir}

Citation

If you find this work useful in your research or publication, please cite this work:

@inproceedings{cummings2022_sia,
  author={Cummings, Sol and Kondmann, Lukas and Zhu, Xiao Xiang},
  booktitle={IGARSS 2022 - 2022 IEEE International Geoscience and Remote Sensing Symposium},
  title={Siamese Attention U-Net for Multi-Class Change Detection},
  year={2022},
  pages={211-214},
  doi={10.1109/IGARSS46834.2022.9884834}
}

earthvision2021-weakly-supervised's People

Contributors

solcummings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

earthvision2021-weakly-supervised's Issues

about dataset

I can't download the dataset. Could you share me with the dataset?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.