GithubHelp home page GithubHelp logo

bifa's Introduction

BiFA: Remote Sensing Image Change Detection with Bitemporal Feature Alignment



     TGRS      PDF     


GitHub stars license



Introduction

This repository is the code implementation of the paper BiFA: Remote Sensing Image Change Detection with Bitemporal Feature Alignment

The current branch has been tested on Linux system, PyTorch 1.12.0 and CUDA 12.1, supports Python 3.7.

If you find this project helpful, please give us a star ⭐️, your support is our greatest motivation.

Updates

🌟 2024.06.20 Revised the BiFA project.

Benchmark

Change detection methods supported by the repository

  • FC-EF (ICIP'2018)
  • FC-Siam-diff (ICIP'2018)
  • FC-Siam-conc (ICIP'2018)
  • IFN (ISPRS'2020)
  • SNUNet (GRSL'2021)
  • SwinUnet (TGRS'2022)
  • BIT (TGRS'2022)
  • ChangeFormer (IGARSS'22)
  • MSCANet (JSTARS'2022)
  • Paformer (GRSL'2022)
  • DARNet (TGRS'2022)
  • ACABFNet (JSTARS'2023)
  • BiFA (TGRS'2024)
  • ......

TODO

  • Updated more change detection methods

Table of Contents

Installation

Requirements

  • Linux system, Windows, depending on MMCV can be installed
  • Python 3.6+, recommended 3.7
  • PyTorch 1.10+ or higher, recommended 1.12.0
  • CUDA 11.7 or higher, recommended 12.1

Environment Installation

It is recommended to use Miniconda for installation. The following commands will create a virtual environment named bifa and install PyTorch. In the following installation steps, the default installed CUDA version is 12.1. If your CUDA version is not 12.1, please modify it according to the actual situation.

Note: If you are experienced with PyTorch and have already installed it, you can skip to the next section. Otherwise, you can follow the steps below.

Step 0: Install Miniconda.

Step 1: Create a virtual environment named bifa and activate it.

conda create -n bifa python=3.7
conda activate bifa

Step 2: Install dependencies.

pip install -r requirements.txt

Note: Use the following command to install mmcv

pip install mmcv-full==1.6.2 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.12/index.html

Install BiFA

You can download or clone the BiFA repository.

git clone [email protected]:zmoka-zht/BiFA.git
cd BiFA

Dataset Preparation

Remote Sensing Change Detection Dataset

We provide the method of preparing the remote sensing change detection dataset used in the paper.

WHU-CD Dataset

LEVIR-CD Dataset

LEVIR+-CD Dataset

SYSU-CD Dataset

CLCD-CD Dataset

DSIFN-CD Dataset

Organization Method

You can also choose other sources to download the data, but you need to organize the dataset in the following format:

${DATASET_ROOT} # Dataset root directory, for example: /home/username/data/LEVIR-CD
├── A
│   ├── train_1_1.png
│   ├── train_1_2.png
│   ├──...
│   ├── val_1_1.png
│   ├── val_1_2.png
│   ├──...
│   ├── test_1_1.png
│   ├── test_1_2.png
│   └── ...
├── B
│   ├── train_1_1.png
│   ├── train_1_2.png
│   ├──...
│   ├── val_1_1.png
│   ├── val_1_2.png
│   ├──...
│   ├── test_1_1.png
│   ├── test_1_2.png
│   └── ...
├── label
│   ├── train_1_1.png
│   ├── train_1_2.png
│   ├──...
│   ├── val_1_1.png
│   ├── val_1_2.png
│   ├──...
│   ├── test_1_1.png
│   ├── test_1_2.png
│   └── ...
├── list
│   ├── train.txt
│   ├── val.txt
│   └── test.txt

Model Training and Testing

All configuration for model training and testing are stored in the local folder config

Example of Training on LEVIR-CD Dataset

python train.py --config/levir.json 

Example of Testing on LEVIR-CD Dataset

python test.py --config/levir_test_bifa.json 

BiFA Weight

  • The model weights of BiFA are provided in the experiments/pretrain
  • Segformer weight download link: Segformer PanBaiDu. Code:i81p

Citation

If you use the code or performance benchmarks of this project in your research, please refer to the following bibtex citation of BiFA.

@ARTICLE{10471555,
  author={Zhang, Haotian and Chen, Hao and Zhou, Chenyao and Chen, Keyan and Liu, Chenyang and Zou, Zhengxia and Shi, Zhenwei},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={BiFA: Remote Sensing Image Change Detection With Bitemporal Feature Alignment}, 
  year={2024},
  volume={62},
  number={},
  pages={1-17},
  keywords={Feature extraction;Task analysis;Remote sensing;Transformers;Interference;Decoding;Optical flow;Bitemporal interaction (BI);change detection (CD);feature alignment;flow field;high-resolution optical remote sensing image;implicit neural representation},
  doi={10.1109/TGRS.2024.3376673}}

License

This project is licensed under the Apache 2.0 License.

Contact Us

If you have any other questions❓, please contact us in time 👬

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.