Home

Awesome

SRCDNet

The pytorch implementation for "Super-resolution-based Change Detection Network with Stacked Attention Module for Images with Different Resolutions " on IEEE Transactions on Geoscience and Remote Sensing.

The SRCDNet is designed to learn and predict change maps from bi-temporal images with different resolutions, which can be neatly turned into a CDNet and applied to images without any resolution difference.

Requirements

Datasets

Since the intial BCDD and CDD dataset only contains bi-temporal images with the same resolution, in our experiment, images of the latter phase are down-samplinged by 4 and 8 times to simulate resolution difference of 4 and 8 times (4x and 8x), respectively.

The data folder is structured as follows:

├── data/   
│   ├── CDD/    # CDD dataset
|   |   ├── train/    # traning set 
|   |   |   ├── time1/    #images of time t1
|   |   |   ├── time2/    #images of time t2
|   |   |   ├── time2_lr/    #lower resolution images of time t2
|   |   |   |   ├── X4.00/    #4 times resolution difference
|   |   |   |   ├── X8.00/    #8 times resolution difference
|   |   |   ├── label/    #ground truth
|   |   ├── val/    # validation set, have the same structure of the training set 
│   ├── BCDD/    # BCDD dataset, have the same structure of the CDD dataset
│   └── 			
└── epochs/    # path to save the model
│   ├── CD/     
│   ├── SR/
│   └── 
...

Train Examples

python train_srcd.py  --scale 4 
--hr1_train '../data/CDD/train/time1' 
--lr2_train '../data/CDD/train/time2_lr/X4.00'
--hr2_train '../data/CDD/train/time2'
--lab_train '../data/CDD/train/label'
--hr1_val '../data/CDD/val/time1'
--lr2_val '../data/CDD/val/time2_lr/X4.00'
--hr2_val '../data/CDD/val/time2'
--lab_val '../data/CDD/val/label' 
--model_dir 'epochs/X4.00/CD/'
--sr_dir 'epochs/X4.00/SR/'
--sta_dir 'statistics/CDD_4x.csv'

*Note that more optional arguments could be found and retified in configures.py, including: num_epochs, gpu_id, batchsize, lr, etc.

python train_srcd.py  --scale 8 
--hr1_train '../data/BCDD/train/time1' 
--lr2_train '../data/BCDD/train/time2_lr/X4.00'
--hr2_train '../data/BCDD/train/time2'
--lab_train '../data/BCDD/train/label'
--hr1_val '../data/BCDD/val/time1'
--lr2_val '../data/BCDD/val/time2_lr/X4.00'
--hr2_val '../data/BCDD/val/time2'
--lab_val '../data/BCDD/val/label' 
--model_dir 'epochs/X8.00/CD/'
--sr_dir 'epochs/X8.00/SR/'
--sta_dir 'statistics/BCDD_8x.csv'
python train_cd.py  
--hr1_train '../data/BCDD/train/time1' 
--hr2_train '../data/BCDD/train/time2'
--lab_train '../data/BCDD/train/label'
--hr1_val '../data/BCDD/val/time1'
--hr2_val '../data/BCDD/val/time2'
--lab_val '../data/BCDD/val/label' 
--model_dir 'epochs/X0.00/CD/'
--sta_dir 'statistics/CDD_0x.csv'

Citation

Please cite our paper if you use this code in your work:

@ARTICLE{liu2021super,
  author={Liu, Mengxi and Shi, Qian and Marinoni, Andrea and He, Da and Liu, Xiaoping and Zhang, Liangpei},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={Super-Resolution-Based Change Detection Network With Stacked Attention Module for Images With Different Resolutions}, 
  year={2021},
  volume={},
  number={},
  pages={1-18},
  doi={10.1109/TGRS.2021.3091758}}

Acknowledgment

This code is heavily borrowed from the SRGAN and STANet.