TTSR (CVPR2020)
Official PyTorch implementation of the paper Learning Texture Transformer Network for Image Super-Resolution accepted in CVPR 2020.
Contents
- Introduction
- Requirements and dependencies
- Model
- Quick test
- Dataset prepare
- Evaluation
- Train
- Citation
- Contact
Introduction
We proposed an approach named TTSR for RefSR task. Compared to SISR, RefSR has an extra high-resolution reference image whose textures can be utilized to help super-resolve low-resolution input.
Contribution
- We are one of the first to introduce the transformer architecture into image generation tasks. More specifically, we propose a texture transformer with four closely-related modules for image SR which achieves significant improvements over SOTA approaches.
- We propose a novel cross-scale feature integration module for image generation tasks which enables our approach to learn a more powerful feature representation by stacking multiple texture transformers.
Approach overview
Main results
Requirements and dependencies
- python 3.7 (recommend to use Anaconda)
- python packages:
pip install opencv-python imageio
- pytorch >= 1.1.0
- torchvision >= 0.4.0
Model
Pre-trained models can be downloaded from onedrive, baidu cloud(0u6i), google drive.
- TTSR-rec.pt: trained with only reconstruction loss
- TTSR.pt: trained with all losses
Quick test
- Clone this github repo
git clone https://github.com/FuzhiYang/TTSR.git
cd TTSR
- Download pre-trained models and modify "model_path" in test.sh
- Run test
sh test.sh
- The results are in "save_dir" (default:
./test/demo/output
)
Dataset prepare
- Download CUFED train set and CUFED test set
- Make dataset structure be:
- CUFED
- train
- input
- ref
- test
- CUFED5
- train
Evaluation
- Prepare CUFED dataset and modify "dataset_dir" in eval.sh
- Download pre-trained models and modify "model_path" in eval.sh
- Run evaluation
sh eval.sh
- The results are in "save_dir" (default:
./eval/CUFED/TTSR
)
Train
- Prepare CUFED dataset and modify "dataset_dir" in train.sh
- Run training
sh train.sh
- The training results are in "save_dir" (default:
./train/CUFED/TTSR
)
Related projects
We also sincerely recommend some other excellent works related to us.
- FTVSR: Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
- TTVSR: Learning Trajectory-Aware Transformer for Video Super-Resolution
- CKDN: Learning Conditional Knowledge Distillation for Degraded-Reference Image Quality Assessment
Citation
@InProceedings{yang2020learning,
author = {Yang, Fuzhi and Yang, Huan and Fu, Jianlong and Lu, Hongtao and Guo, Baining},
title = {Learning Texture Transformer Network for Image Super-Resolution},
booktitle = {CVPR},
year = {2020},
month = {June}
}
Contact
If you meet any problems, please describe them in issues or contact:
- Fuzhi Yang: [email protected]