seungho-snu / SROT

Perception-Oriented Single Image Super-Resolution using Optimal Objective Estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hits

SROT

Perception-Oriented Single Image Super-Resolution using Optimal Objective Estimation (CVPR 2023) Link

Seung Ho Park, Young Su Moon, Nam Ik Cho

SROT (SR model trained with an Objective Trajectory) Training

ESRGAN-SROT-M1234-v2-4x

  • The objective trajectory of the training code is as in our CVPR paper Link

  • Changes in the SROT results according to t values

Usage:

Environments

  • Pytorch 1.10.0
  • CUDA 11.3
  • Python 3.8

Test

To test the pre-trained ESRGAN-SROT model:

python test.py -opt options/test/test.yml
  • Before running this code, download the pre-trained ESRGAN SROT 4x model Link.
  • Set the path of dataroot_LQ and pretrain_model_G in the yml file.

You can also test the pre-trained ESRGAN-SROT model with different t values as follows:

python test.py -opt options/test/test.yml -t 1.0
python test.py -opt options/test/test.yml -t 0.0
python test.py -opt options/test/test.yml -t 0.3

Training

To train an ESRGAN-SROT model:

python train.py -opt options/train/train.yml

Before you run this code, please prepare the training pairs. An example of using the DIV2K dataset is

python extract_subimgs_single.py -i path_to\DIV2K_train_HR\ -o path_to\DIV2K_train_HR_sub_480 -crop_sz 480 -step 240    
python extract_subimgs_single.py -i path_to\DIV2K_train_LR_bicubic\X4 -o path_to\DIV2K_train_LR_bicubic\X4_sub_120 -crop_sz 120 -step 60
  • Set the paths in the yml file. In this case, dataroot_LQ is path_to\DIV2K_train_LR_bicubic\X4_sub_120, and dataroot_GT is path_to\DIV2K_train_HR_sub_480.
  • The extract_subimgs_single.py code is in the codes\scripts.

Before running this code, download the pre-trained RRDB SR 4x model Link. This pre-trained RRDB_PSNR_4x.pth is provided by the ESRGAN author Link.

  • Set the path of pretrain_model_G in the yml file.

Citation

@InProceedings{Park_2023_CVPR,
    author    = {Park, Seung Ho and Moon, Young Su and Cho, Nam Ik},
    title     = {Perception-Oriented Single Image Super-Resolution Using Optimal Objective Estimation},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2023},
    pages     = {1725-1735}
}

Acknowledgement

Our work and implementations are inspired by and based on BasicSR [site]

About

Perception-Oriented Single Image Super-Resolution using Optimal Objective Estimation

License:Apache License 2.0


Languages

Language:Python 100.0%