/FS-NCSR

"FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow" (CVPRW 2022)

Primary LanguagePythonMIT LicenseMIT

FS-NCSR

Official PyTorch implementation of "FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow" [paper]

CVPRW 2022, Runner-up at NTIRE 2022 Learning the Super Resolution Space Challenge

This repository is heavily based on SRFlow and NCSR

photo not available

Setup

Environment

python pip install -r requirements.txt

We recommand a virtual environment such as Anaconda for running this code.

Preparing data

python prepare_data.py /path/to/img_dir

RRDB pretrained weights

Download pretrained weights of RRDB and place them into 'pretrained_weights' folder

RRDB_DF2K_4X.pth
RRDB_DF2K_8X.pth

These pretrained weights are originally from SRFlow

Training

python train.py -opt path/to/Confpath
  • path/to/Confpath is model parameter script which is in code/confs/~.yml

Test

python eval.py --scale scale_factor --lrtest_path path/to/LRpath --conf_path path/to/Confpath
  • To eval with pretrained model, please check model_path in Confpath.
  • Pretriained models should be in code/pretrained_model

Results

photo not available photo not available