Code release for "AnySR: Realizing Image Super-Resolution as Any-Scale, Any-Resource"
Paper: AnySR: Realizing Image Super-Resolution as Any-Scale, Any-Resource
Our code is based on Ubuntu 18.04, pytorch 1.10.2, CUDA 11.3 and python 3.9.
- python 3.9
- pytorch 1.10.2
- tensorboard、tensorboardX
- pyyaml
- numpy
- tqdm
- imageio
- matplotlib
- opencv-python
python train.py --config configs/train_edsr-anysr.yaml --gpu 0,1,2,3
python train.py --config configs/train_rdn-anysr.yaml --gpu 0,1,2,3
Please download the pretrain model (EDSR, RDN) to the folder /AnySR, or modify the model['path'], model['args']['encoder_spec']['path'], and 'pretrain' field in the configs file to your model path.
bash test-benchmark.sh save/_train_edsr-anysr/epoch-500.pth True 1 0
bash test-benchmark.sh save/_train_edsr-anysr/epoch-500.pth True 1 1
python demo.py --input lr.png --model save/_train_edsr-anysr/epoch-500.pth --scale 2 --output output.png --test_only 1 --entire_net 0
python demo.py --input lr.png --model save/_train_edsr-anysr/epoch-500.pth --scale 2 --output output.png --test_only 1 --entire_net 1
srno_edsr_baseline_epoch_1000.pth