EGENet: Edge-Guided Enhancement Network for Building Change Detection of Remote Sensing Images with a Hybrid CNN-Transformer Architecture
Here, we provide the pytorch implementation of the paper: Edge-Guided Enhancement Network for Building Change Detection of Remote Sensing Images with a Hybrid CNN-Transformer Architecture. For more information, please see our paper at IGARSS.
conda create -n egenet python=3.8
conda activate egenet
pip install -r requirements.txt
"""
Change detection data set with pixel-level binary labels;(WHU256 or LEVIR-CD-256)
├─A
├─B
├─label
├─label_edge
└─list
"""
A
: images of t1 phase;
B
:images of t2 phase;
label
: label maps;
label_edge
: using the Canny edge detection operator on theusing the Canny edge detection operator on the label maps;
list
: contains train.txt, val.txt and test.txt
, each file records the image names (XXX.png) in the change detection dataset.
and put them into data directory. In addition, the processed whu dataset can be found in the release.
and put it into pretrain directory.
The following are scripts for different networks and datasets, run according to your needs
python main_cd.py --project_name 'EGENet_LEVIR' --data_name 'LEVIR' --net_G 'EGENet'
python main_cd.py --project_name 'EGENet_WHU' --data_name 'WHU' --net_G 'EGENet'
python main_cd.py --project_name 'EGCTNet_LEVIR' --data_name 'LEVIR' --net_G 'EGCTNet'
python main_cd.py --project_name 'EGCTNet_WHU' --data_name 'WHU' --net_G 'EGCTNet'
python main_cd.py --project_name 'BIT_LEVIR' --data_name 'LEVIR' --net_G 'BIT' --loss 'ce'
python main_cd.py --project_name 'BIT_WHU' --data_name 'WHU' --net_G 'BIT' --loss 'ce'
python main_cd.py --project_name 'ICIF_Net_LEVIR' --data_name 'LEVIR' --net_G 'ICIF_Net' --loss 'ce'
python main_cd.py --project_name 'ICIF_Net_WHU' --data_name 'WHU' --net_G 'ICIF_Net' --loss 'ce'
python main_cd.py --project_name 'ChangeFormer_LEVIR' --data_name 'LEVIR' --net_G 'ChangeFormer' --loss 'ce'
python main_cd.py --project_name 'ChangeFormer_WHU' --data_name 'WHU' --net_G 'ChangeFormer' --loss 'ce'
Appreciate the work from the following repositories:
- EGCTNet (Our EGENet is implemented on the code provided in this repository)