Giter Club home page Giter Club logo

transwcd's Introduction

TransWCD: Transformer-based Weakly-Supervised Change Detection

📔 Code for Paper: Exploring Effective Priors and Efficient Models for Weakly-Supervised Change Detection [arXiv]

Update

Higher-performing TransWCD baselines have been released, with F1 score of +2.47 on LEVIR-CD and +5.72 on DSIFN-CD compared to those mentioned in our paper.

Abastract

Weakly-supervised change detection (WSCD) aims to detect pixel-level changes with only image-level (i.e., scene-level) annotations. We develop TransWCD, a simple yet powerful transformer-based model, showcasing the potential of weakly-supervised learning in change detection.

💬 TransWCD Architectures (Encoder-Only):

A. Preparations

1. Download Dataset

You can download WHU-CD, DSIFN-CD, LEVIR-CD, and other CD datasets, then use our data_and_label_processing to convert these raw change detection datasets into cropped weakly-supervised change detection datasets.

Or use the processed weakly-supervised datasets from here. Please cite their papers and ours.

WSCD dataset with image-level labels:
├─A
├─B
├─label
├─imagelevel_labels.npy
└─list

2. Download Pre-trained Weights

Download the pre-trained weights from SegFormer and move them to transwcd/pretrained/.

3.Create and activate conda environment

conda create --name transwcd python=3.6
conda activate transwcd
pip install -r requirments.txt

B. Train and Test

# train 
python train_transwcd.py

You can modify the corresponding implementation settings WHU.yaml, LEVIR.yaml, and DSIFN.yaml in train_transwcd.py for different datasets.

# test
python test.py

Please remember to modify the corresponding configurations in test.py, and the visual results can be found at transwcd/results/

C. Performance and Best Models

TransWCD WHU-CD LEVIR-CD DSIFN-CD
Single-Stream 67.81/Best model 51.06/Best model 57.28/Best model
Dual-Stream 68.73/Best model 62.55/Best model 59.13/Best model

*Average F1 score / Best model

On both WHU-CD and LEVIR-CD datasets, the test performance closely matches that of the validation, with differences < 3% F1 score.

Citation

If it's helpful to your research, please kindly cite. Here is an example BibTeX entry:

@article{zhao2023exploring,
  title={Exploring Effective Priors and Efficient Models for Weakly-Supervised Change Detection},
  author={Zhao, Zhenghui and Ru, Lixiang and Wu, Chen},
  journal={arXiv preprint arXiv:2307.10853},
  year={2023}
}

Acknowledgement

Thanks to these brilliant works BGMix, ChangeFormer, and SegFormer!

transwcd's People

Contributors

zhenghuizhao avatar

Stargazers

 avatar  avatar Qingran Cai avatar Finley Jiang avatar  avatar Alice.SHI avatar Cuiqun Chen avatar  avatar fyan avatar JingwenYuan avatar Tongfei avatar Lin Manhui avatar  avatar Humeiqi胡美琪-武汉大学 avatar  avatar YichuXu avatar 金垚-武汉大学 avatar Jiaqi Yang avatar  avatar Tan Ziqian avatar  avatar oo avatar XiaoleiQin avatar Mancy Li avatar  avatar  avatar Sapere Aude avatar

Watchers

Kostas Georgiou avatar  avatar  avatar

transwcd's Issues

Questions about code integrity.

Dear author, I have carefully read your public code, but the training script does not seem to involve the Dilated Prior Decoder and Labeled Gated Constraint mentioned in the paper. In addition, the code uses the pre-trained model parameters of SegFormer and relies on additional information, which seems to be contrary to the paradigm and principles of weakly supervised learning. I hope the author can answer these two questions in his busy schedule.

errors about funtion cam_to_label

Thank you very much for your excellent work!!!

One problem was found during code execution。

cam_to_label function only has four parameters, but in train_transwcd.py convert five parameters to this function.

image

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.