Official implementation for the paper "A New Learning Paradigm for Foundation Model-based Remote Sensing Change Detection", the code is developed on top of Open-CD v1.1.0.
- 2/10/2024 - BAN is supported in Open-CD. 😋
- Create a conda virtual environment and activate it:
conda create -n BAN python=3.8 -y
conda activate BAN
- Install
PyTorch
andtorchvision
:
For examples, to install torch==2.0.0 with CUDA==11.8:
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
- Install
OpenMMLab
Toolkits as Python packages:
pip install -U openmim
mim install mmengine==0.10.1
mim install mmcv==2.1.0
mim install mmpretrain==1.1.1
pip install mmsegmentation==1.2.2
pip install mmdet==3.2.0
- Install Open-CD
git clone https://github.com/likyoo/open-cd.git
cd open-cd
pip install -v -e .
cd ..
- Install other requirements:
pip install ftfy regex
- Clone this repo:
git clone https://github.com/likyoo/BAN.git
cd BAN
Download datasets (LEVIR-CD, S2Looking, BANDON, WHU-CD) and move (or link) them to BAN/data
.
To evaluate our BAN
on LEVIR-CD test, run:
python test.py <config-file> <checkpoint>
You can download checkpoint files from huggingface | baidu disk.
For example, to evaluate the BAN-vit-l14-clip_mit-b0
with a single GPU:
python test.py configs/ban/ban_vit-l14-clip_mit-b0_512x512_40k_levircd.py checkpoint/ban_vit-l14-clip_mit-b0_512x512_40k_levircd.pth
To train the BAN
, run:
python train.py <config-file>
For example, to train the BAN-vit-l14-clip_mit-b0
with a single GPU on LEVIR-CD, run:
python train.py configs/ban/ban_vit-l14-clip_mit-b0_512x512_40k_levircd.py
Note: You can download pretrained files from huggingface | baidu disk.
@ARTICLE{10438490,
author={Li, Kaiyu and Cao, Xiangyong and Meng, Deyu},
journal={IEEE Transactions on Geoscience and Remote Sensing},
title={A New Learning Paradigm for Foundation Model-based Remote Sensing Change Detection},
year={2024},
volume={},
number={},
pages={1-1},
keywords={Adaptation models;Task analysis;Data models;Computational modeling;Feature extraction;Transformers;Tuning;Change detection;foundation model;visual tuning;remote sensing image processing;deep learning},
doi={10.1109/TGRS.2024.3365825}}