Skip to content

BITszwang/CTNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

CTNet

Official Pytorch implementation of the paper "Contextual Transformation Network for Lightweight Remote Sensing Image Super-Resolution" accepted by IEEE TGRS.

Requirements

  • Python 3.7
  • Pytorch=1.5
  • torchvision=0.6.0
  • matplotlib
  • opencv-python
  • scipy
  • tqdm
  • scikit-image

Installation

Clone or download this code and install aforementioned requirements

cd codes

Dataset

We used the UCMerced dataset for both training and testing. Please first download the dataset via OneDrive (key:912V).

Download the results

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).

Train

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

Test

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

Evaluation

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

Citation

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

Acknowledgements

This code is built on HSENet (Pytorch). We thank the authors for sharing the codes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published