Coder Social home page Coder Social logo

jesus-almansa / ban Goto Github PK

View Code? Open in Web Editor NEW

This project forked from likyoo/ban

0.0 0.0 0.0 730 KB

The pytorch implementation for "A New Learning Paradigm for Foundation Model-based Remote Sensing Change Detection"

Home Page: https://arxiv.org/abs/2312.01163

License: Apache License 2.0

Shell 2.89% Python 96.95% Jupyter Notebook 0.16%

ban's Introduction

BAN

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.

News

  • 2/10/2024 - BAN is supported in Open-CD. ๐Ÿ˜‹

Usage

Install

  • Create a conda virtual environment and activate it:
conda create -n BAN python=3.8 -y
conda activate BAN
  • Install PyTorch and torchvision :

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

Data Preparation

Download datasets (LEVIR-CD, S2Looking, BANDON, WHU-CD) and move (or link) them to BAN/data.

Evaluation

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

Training

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.

Citation

@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}}

ban's People

Contributors

likyoo avatar jesus-almansa 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.