Code Monkey home page Code Monkey logo

dan's Introduction

This is an official implementation of Unfolding the Alternating Optimization for Blind Super Resolution

If this repo works for you, please cite our paper:

@article{luo2020unfolding,
  title={Unfolding the Alternating Optimization for Blind Super Resolution},
  author={Luo, Zhengxiong and Huang, Yan and Li, Shang and Wang, Liang and Tan, Tieniu},
  journal={Advances in Neural Information Processing Systems (NeurIPS)},
  volume={33},
  year={2020}
}

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

News

  • Add more pretrained weights and update the results of DANv1 !

  • Add pretrained weights and update the results of about [IKC]!

  • Add DANv2

Main Results

Results about Setting 1

Method Scale Set5 Set5 Set14 Set14 B100 B100 Urban100 Urban100 Mangan109 Manga109
PSNR SSIM PSNR SSIM PSNR SSIM PSNR SSIM PSNR SSIM
IKC x2 37.19 0.9526 32.94 0.9024 31.51 0.8790 29.85 0.8928 36.93 0.9667
DANv1 x2 37.34 0.9526 33.08 0.9041 31.76 0.8858 30.60 0.9060 37.23 0.9710
IKC x3 33.06 0.9146 29.38 0.8233 28.53 0.7899 27.43 0.8302 32.43 0.9316
DANv1 x3 34.04 0.9199 30.09 0.8287 28.94 0.7919 27.65 0.8352 33.16 0.9382
IKC x4 31.67 0.8829 28.31 0.7643 27.37 0.7192 25.33 0.7504 28.91 0.8782
DANv1 x4 31.89 0.8864 28.42 0.7687 27.51 0.7248 25.86 0.7721 30.50 0.9037

Results about Setting 2 (DIV2KRK)

Method x2 x2 x4 x4
PSNR SSIM PSNR SSIM
KernelGAN + ZSSR 30.36 0.8669 26.81 0.7316
DANv1 32.56 0.8997 27.55 0.7582

Dependenices

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

Pretrained Weights

Pretrained weights of DANv1 and IKC are available at BaiduYun(Password: cbjv) or GoogleDrive. Download the weights to checkpoints

.
|-- checkpoints
`-- |-- DANv1
    |   |-- ...
    `--IKC
        |-- ... 

Dataset Preparation

We use DIV2K and Flickr2K as our training datasets.

For evaluation of Setting 1, we use five datasets, i.e., Set5, Set14, Urban100, BSD100 and Manga109.

We use DIV2KRK for evaluation of Setting 2.

To train a model on the full dataset(DIV2K+Flickr2K, totally 3450 images), download datasets from official websites. After download, run codes/scripts/generate_mod_blur_LR_bic.py to generate LRblur/LR/HR/Bicubic datasets paths. (You need to modify the file paths by yourself.)

python3 codes/scripts/generate_mod_blur_LR_bic.py

For efficient IO, run codes/scripts/create_lmdb.py to transform datasets to binary files. (You need to modify the file paths by yourself.)

python3 codes/scripts/create_lmdb.py

Train

For single GPU:

cd codes/config/DANv1
python3 train.py -opt=options/setting1/train_setting1_x4.yml

For distributed training

cd codes/config/DANv1
python3 -m torch.distributed.launch --nproc_per_node=8 --master_poer=4321 train.py -opt=options/setting1/train_setting1_x4.yml --launcher pytorch

Test on Synthetic Images

cd codes/config/DANv1
python3 test.py -opt=options/setting1/test_setting1_x4.yml

Test on Real Images

cd codes/config/DANv1
python3 inference.py -input_dir=/path/to/real/images/ -output_dir=/path/to/save/sr/results/

dan's People

Contributors

greatlog avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.