GithubHelp home page GithubHelp logo

xizhipeng0618 / senseearth2020-changedetection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liheyoung/senseearth2020-changedetection

0.0 0.0 0.0 7.1 MB

1st place solution to the Satellite Remote Sensing Image Change Detection Challenge hosted by SenseTime

Home Page: https://rs.sensetime.com/competition/index.html#/info

License: MIT License

Python 100.00%

senseearth2020-changedetection's Introduction

SenseEarth2020 - ChangeDetection

1st place in the Satellite Remote Sensing Image Change Detection Challenge hosted by SenseTime.

Our Method

Task Description

Given two images of the same scene acquired at different times, we are required to mark the changed and unchanged areas. Moreover, as for the changed areas, we need to annotate their detailed semantic masks.

The change detection task in this competition can be decomposed into two sub-tasks:

  • binary segmentation of changed and unchanged areas.
  • semantic segmentation of changed areas.

Model

image

Pseudo Labeling

The core practice is using self-distillation strategy to assign pseudo labels to unchanged areas.

Specifically, in our experiments, predictions of five HRNet-based segmentation models are ensembled, serving as pseudo labels of unchanged areas.

The overall training process can be summarized as:

  • Training multiple large segmentation models.
  • Ensembling their predictions on unchanged areas.
  • Training a smaller model with both labeled and pseudo labeled areas.

For more details, please refer to the technical report and presentation.

Getting Started

Dataset

Description | Download [password: f3qq]

Pretrained Model

HRNet-W18 | HRNet-W40 | HRNet-W44 | HRNet-W48 | HRNet-W64

Final Trained Model

PSPNet-HRNet-W18 | PSPNet-HRNet-W40

File Organization

# store the whole dataset and pretrained backbones
mkdir -p data/dataset ; mkdir -p data/pretrained_models ;

# store the trained models
mkdir -p outdir/models ; 

# store the pseudo masks
mkdir -p outdir/masks/train/im1 ; mkdir -p outdir/masks/train/im2 ;

# store predictions of validation set and testing set
mkdir -p outdir/masks/val/im1 ; mkdir -p outdir/masks/val/im2 ;
mkdir -p outdir/masks/test/im1 ; mkdir -p outdir/masks/test/im2 ;

├── data
    ├── dataset                    # download from the link above
    │   ├── train                  # training set
    |   |   ├── im1
    |   |   └── ...
    │   └── val                    # the final testing set (without labels)
    |
    └── pretrained_models
        ├── hrnet_w18.pth
        ├── hrnet_w40.pth
        └── ...

Training

# Please refer to utils/options.py for more arguments
# If hardware supports, more backbones can be trained, such as hrnet_w44, hrnet_w48
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --backbone hrnet_w18 --pretrained --model pspnet --lightweight

Pseudo Labeling & Re-training

# This step is optional but important in performance improvement
# Modify the backbones, models and checkpoint paths in L20-40 in label.py manually according to your saved models
# It is better to ensemble multiple trained models for pseudo labeling

# Pseudo labeling
CUDA_VISIBLE_DEVICES=0,1,2,3 python label.py

# Re-training
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --backbone hrnet_w18 --pretrained --model pspnet --lightweight --use-pseudo-label

Testing

# Modify the backbones, models and checkpoint paths in L39-44 in test.py manually according to your saved models
# Or simply use our final trained models
CUDA_VISIBLE_DEVICES=0,1,2,3 python test.py

senseearth2020-changedetection's People

Contributors

liheyoung avatar

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.