Skip to content

jiahong-fu/KXNet

Repository files navigation

KXNet: A Model-Driven Deep Neural Network for Blind Super-Resolution (ECCV, 2022 Oral)

Jiahong Fu, Hong Wang, Qi Xie, Qian Zhao, Deyu Meng, and Zongben Xu
[Paper] [Supplementary Material]
Implementation of 'KXNet: A Model-Driven Deep Neural Network for Blind Super-Resolution' (ECCV2022)

This repo is build on the basis of [DAN] and [IKC]

News

  • Add KXNet

Dependenices

  • python3
  • pytorch >= 1.6
  • NVIDIA GPU + CUDA
  • Python packages: pip3 install numpy opencv-python lmdb pyyaml

Pretrained models

Pretrained models of KXNet are available as here. Download the models to ./checkpoints

Dataset Preparation

For train We use DIV2K and Flickr2K as our training datasets. Download them and put the images in DIV2K_Flickr2K.

For evaluation, we use four datasets, i.e., Set5, Set14, Urban100, and BSD100. All test datesets can be downloaded from BaiduYun (Password: uag1).

Setting1: We used the Gaussian8 blur kernel set to generate the noise free test data. Run 'codes/scripts/generate_mod_isoblur_LR_sfold.py' to generate LRblur/HR datasets.

Setting2: We separately set the kernel width as $\lambda_1 = 0.8, \lambda_2 = 1.6$ and $\lambda_1 = 2.0, \lambda_2 = 4.0$, and rotate them by $\theta \in { 0, \frac{\pi}{4}, \frac{\pi}{2}, \frac{3\pi}{4} }$, respectively. This means we have 8 different blur kernels and use them to generate test data at noise level $\sigma \in { 0, 5, 15}$. Run 'codes/scripts/generate_mod_anisoblur_LR_sfold.py' to generate LRblur/HR datasets.

Train

For single GPU:

cd codes/config/KXNet
python3 train.py -opt=options/setting1/train/train_setting2_x2.yml

For distributed training

cd codes/config/KXNet
python3 -m torch.distributed.launch --nproc_per_node=8 --master_port=4321 train.py -opt=options/setting2/train/train_setting2_x2.yml --launcher pytorch

Test on Synthetic Images

cd codes/config/KXNet
python3 test.py -opt=options/setting2/test/test_setting2_x2.yml

About

Implementation of 'KXNet: A Model-Driven Deep Neural Network for Blind Super-Resolution' (ECCV2022 Oral)

Resources

Stars

Watchers

Forks

Packages

No packages published