Skip to content

dyzy41/lenet

Repository files navigation

OPEN-RSCD Configuration Tutorial

Data Prepared

In order to facilitate the use of relative paths, CDPATH is set in the ~/.bashrc file. Add the follow line in ~/.bashrc

export CDPATH="/data8T/DSJJ/CDdata"

After adding CDPATH as mentioned above, you can quickly navigate to the respective data path in the following way:

import os  
data_root = os.path.join(os.environ.get("CDPATH"), 'SYSU-CD')

Take SYSU-CD dataset as an example, here introduce the usage of the code.

Use tools/general/write_path.py to generate a txt file for the dataset path. The format is as follows (for details, please refer to the code). The dataset function in this code reads the txt file to get the data list.

/home/user/dsj_files/CDdata/SYSU-CD/test/time1/03414.png  /home/user/dsj_files/CDdata/SYSU-CD/test/time2/03414.png  /home/user/dsj_files/CDdata/SYSU-CD/test/label/03414.png
/home/user/dsj_files/CDdata/SYSU-CD/test/time1/00708.png  /home/user/dsj_files/CDdata/SYSU-CD/test/time2/00708.png  /home/user/dsj_files/CDdata/SYSU-CD/test/label/00708.png
/home/user/dsj_files/CDdata/SYSU-CD/test/time1/03907.png  /home/user/dsj_files/CDdata/SYSU-CD/test/time2/03907.png  /home/user/dsj_files/CDdata/SYSU-CD/test/label/03907.png

Environment

First, you can read the environment.txt and environment.yml. If you install this env by yourself, please check the follow steps.

Create a conda environment with python3.8 or above installed.

conda create --name mmrscd python=3.9
conda activate mmrscd

Make sure you have mmcv>=2.1.0 installed, and make sure your torch version matches mmcv. You can find version matching information from the following linked documents.

For quick start, you can install them by the following command

pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.1/index.html
pip install torch==2.1.0+cu118 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118

Run the follow lines to install the code.

git clone https://github.com/dyzy41/lenet
cd lenet
pip install -v -e .

Please install the following dependencies in turn

gdal

conda install GDAL

ftfy, regex, einops, timm, kornia

pip install ftfy
pip install regex
pip install einops
pip install timm
pip install kornia

Remote Sensing Change Detection Algorithms

We have provided training configuration files for some classic change detection algorithms. As follows:

配置文件 模型名称 期刊 时间
configs/rscd/afcf3d.py AFCF3D TGRS 2023
configs/rscd/bit.py BIT TGRS 2021
configs/rscd/cdnext.py CDNeXt JAG 2024
configs/rscd/cgnet.py CGNet JSTAR 2023
configs/rscd/darnet.py DARNet TGRS 2022
configs/rscd/dminet.py DMINet TGRS 2023
configs/rscd/elgcnet.py ELGCNet TGRS 2024
configs/rscd/gasnet.py GASNet ISPRS 2023
configs/rscd/hanet.py HANet JSTAR 2023
configs/rscd/hatnet.py HATNet TIM 2024
configs/rscd/hcgmnet.py HCGMNet IGARSS 2023
configs/rscd/isdanet.py ISDANet TGRS 2025
configs/rscd/lunet.py LU-Net GRSL 2020
configs/rscd/mscanet.py MSCANet JSTAR 2022
configs/rscd/p2v.py P2V TIP 2022
configs/rscd/rctnet.py RCTNet ICME 2024
configs/rscd/scratch_former.py ScratchFormer TGRS 2024
configs/rscd/stanet.py STANet Remote Sensing 2020
configs/rscd/strobstnet.py STRobustNet TGRS 2025
configs/rscd/c2fnet.py C2FNet TGRS 2024
configs/rscd/ftanet.py FTANet JSTAR 2025

Remote Sensing Change Detection Datasets

SYSU-CD | LEVIR-CD | PX-CLCD | WaterCD | CDD | CLCD

Train command

python tools/train.py configs/rscd/bit.py

The train command of our LENet (Contains the complete training, validation and testing process).

bash tools/train.sh

Other command please refer the [mmsegmentation](GitHub - open-mmlab/mmsegmentation: OpenMMLab Semantic Segmentation Toolbox and Benchmark.)

Other Change Detection Projects, please refer EfficientCD, ChangeCLIP

Citation

If you use this code for your research, please cite our papers.

@Article{Dong_IeeeJSelTopApplEarthObsRemoteSens_2025_p1,
    author =   {Sijun Dong and Fangcheng Zuo and Geng Chen and Siming Fu and Xiaoliang Meng},
    title =    {{A Remote Sensing Image Change Detection Method Integrating Layer-Exchange and Channel-Spatial Differences}},
    journal =  {Ieee J. Sel, Top, Appl, Earth Obs. Remote. Sens.},
    year =     2025,
    pages =    {1--17},
    doi =      {10.1109/JSTARS.2025.3576831}  ,
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages