/NCSR

Code for the CVPR2021 workshop paper "Noise Conditional Flow Model for Learning the Super-Resolution Space"

Primary LanguagePythonMIT LicenseMIT

NCSR: Noise Conditional Flow Model for Learning the Super-Resolution Space

Official NCSR training PyTorch Code for the CVPR2021 workshop paper "Noise Conditional Flow Model for Learning the Super-Resolution Space"

NCSR: Noise Conditional Flow Model for Learning the Super-Resolution Space(https://arxiv.org/abs/2106.04428)

**We got 1st place in NTIRE2021 Learning the Super-Resolution Space. Our team name is Deepest

These figures and tables are from NTIRE2021 Learning the Super-Resolution Space

How to use repo

git clone --recursive https://github.com/younggeun-kim/NCSR.git

Training

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

Test

cd code
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

Measure

cd code/NTIRE21_Learning_SR_Space
python measure.py OutName path/to/Ground-Truth path/to/Super-Resolution n_samples scale_factor 
  • path/to/Super-Resolution is code/output_dir.

Pretrained weight

NCSR X4

NCSR X8

RRDB pretrained weights can be found in SRFlow github

Preparing data

cd code
python prepare_data.py /path/to/img_dir
  • If dataset mode is LRHR_IMG, just use img_dir.
  • If dataset mode is LRHR_PKL, please use this code.

Citation

If you found our work useful, please don't forget to cite

@misc{kim2021noise,
      title={Noise Conditional Flow Model for Learning the Super-Resolution Space}, 
      author={Younggeun Kim and Donghee Son},
      year={2021},
      eprint={2106.04428},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

The code is based on the SRFlow implementation