Official Pytorch implementation of the paper "Contextual Transformation Network for Lightweight Remote Sensing Image Super-Resolution" accepted by IEEE TGRS.
- Python 3.7
- Pytorch=1.5
- torchvision=0.6.0
- matplotlib
- opencv-python
- scipy
- tqdm
- scikit-image
Clone or download this code and install aforementioned requirements
cd codes
We used the UCMerced dataset for both training and testing. Please first download the dataset via OneDrive (key:912V).
We share the super-resolved results generated by our CTNet. Then, researchers can compare their algorithms to our CTNet without performing inference. Results are available at OneDrive (key:912V).
The train/val data pathes are set in data/init.py
# x4
python demo_train_ctnet.py --model=CTNET --dataset=UCMerced --scale=4 --patch_size=192 --ext=img --save=CTNETx4_UCMerced
# x3
python demo_train_ctnet.py --model=CTNET --dataset=UCMerced --scale=3 --patch_size=144 --ext=img --save=CTNETx3_UCMerced
# x2
python demo_train_ctnet.py --model=CTNET --dataset=UCMerced --scale=2 --patch_size=96 --ext=img --save=CTNETx2_UCMerced
The test data path and the save path can be edited in demo_deploy_ctnet.py
# x4
python demo_deploy_ctnet.py --model=CTNET --scale=4
# x3
python demo_deploy_ctnet.py --model=CTNET --scale=3
# x2
python demo_deploy_ctnet.py --model=CTNET --scale=2
Compute the evaluated results in term of PSNR and SSIM, where the SR/HR paths can be edited in calculate_PSNR_SSIM.py
cd metric_scripts
python calculate_PSNR_SSIM.py
If you find this work helpful, please consider citing the following paper:
@article{wang2022contextual,
title={Contextual Transformation Network for Lightweight Remote Sensing Image Super-Resolution},
author={Wang, Shunzhou and Zhou, Tianfei and Lu, Yao and Di, Huijun},
journal={IEEE Transactions on Geoscience and Remote Sensing},
year={2022},
volume={60},
pages={1-13}
}
This code is built on HSENet (Pytorch). We thank the authors for sharing the codes.