Coder Social home page Coder Social logo

megvii-research / dcls-sr Goto Github PK

View Code? Open in Web Editor NEW
218.0 9.0 18.0 6.84 MB

Official PyTorch implementation of the paper "Deep Constrained Least Squares for Blind Image Super-Resolution", CVPR 2022.

License: MIT License

Python 92.98% Shell 0.55% MATLAB 6.47%
blind-super-resolution deblurring pytorch deep-learning super-resolution

dcls-sr's Introduction

[CVPR2022] Deep Constrained Least Squares for Blind Image Super-Resolution

Ziwei Luo1, Haibin Huang2, Lei Yu1, Youwei Li1, Haoqiang Fan1, Shuaicheng Liu3

1. Megvii Research, 2. Kuaishou Technology

3. University of Electronic Science and Technology of China

PWC PWC visitors

This is the official implementation of 'Deep Constrained Least Squares for Blind Image Super-Resolution', CVPR 2022. [Paper]

Updates

[2022.04.22] ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰ Our work BSRT won the 1st place in NTIRE 2022 BurstSR Challenge [Paper][Code].
[2022.03.09] We released the code and provided the pretrained model weights [here].
[2022.03.02] Our paper has been accepted by CVPR 2022.

DCLS

Overview

DCLS

Presentation Video:

[Youtube], [Bilibili]

Dependenices

  • OS: Ubuntu 18.04
  • nvidia :
    • cuda: 10.1
    • cudnn: 7.6.1
  • python3
  • pytorch >= 1.6
  • Python packages: numpy opencv-python lmdb pyyaml

Dataset Preparation

We use DIV2K and Flickr2K as our training datasets (totally 3450 images).

To transform datasets to binary files for efficient IO, run:

python3 codes/scripts/create_lmdb.py

For evaluation of Isotropic Gaussian kernels (Gaussian8), we use five datasets, i.e., Set5, Set14, Urban100, BSD100 and Manga109.

To generate LRblur/LR/HR/Bicubic datasets paths, run:

python3 codes/scripts/generate_mod_blur_LR_bic.py

For evaluation of Anisotropic Gaussian kernels, we use DIV2KRK.

(You need to modify the file paths by yourself.)

Train

  1. The core algorithm is in codes/config/DCLS.
  2. Please modify codes/config/DCLS/options to set path, iterations, and other parameters...
  3. To train the model(s) in the paper, run below commands.

For single GPU:

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

For distributed training

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

Or choose training options use

cd codes/config/DCLS
sh demo.sh

Evaluation

To evalute our method, please modify the benchmark path and model path and run

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

Results

Comparison on Isotropic Gaussian kernels (Gaussian8)

ISO kernel

Comparison on Anisotropic Gaussian kernels (DIV2KRK)

ANISO kernel

Citations

If our code helps your research or work, please consider citing our paper. The following is a BibTeX reference.

@inproceedings{luo2022deep,
  title={Deep constrained least squares for blind image super-resolution},
  author={Luo, Ziwei and Huang, Haibin and Yu, Lei and Li, Youwei and Fan, Haoqiang and Liu, Shuaicheng},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={17642--17652},
  year={2022}
}

Contact

email: [[email protected]]

Acknowledgement

This project is based on [DAN], [MMSR] and [BasicSR].

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.