Giter Site home page Giter Site logo

megvii-research / d2c-sr Goto Github PK

View Code? Open in Web Editor NEW
43.0 3.0 1.0 79 KB

Official MegEngine implementation of ECCV2022 "D2C-SR: A Divergence to Convergence Approach for Real-World Image Super-Resolution".

License: Apache License 2.0

Python 100.00%
realsr super-resolution megengine

d2c-sr's Introduction

[ECCV 2022] D2C-SR: A Divergence to Convergence Approach for Real-World Image Super-Resolution

Youwei Li1, Haibin Huang2, Lanpeng Jia1, Haoqiang Fan1, Shuaicheng Liu3,1

1. Megvii Research, 2. Kuaishou Technology

3. University of Electronic Science and Technology of China

This is the official MegEngine implementation of our ECCV2022 paper "D2C-SR: A Divergence to Convergence Approach for Real-World Image Super-Resolution".

Welcome to try megengine to train your model,and our PyTorch version will also be coming soon at D2C-SR-PyTorch.

Pipeline

pipeline Two stages in D2C architecture: (a) Divergence stage, (b) Convergence stage. Divergence network with tree-based structure outputs multi-predictions with different high-frequency recovery. Convergence network obtains more accurate result by weighted combining divergence results. (c) Divergence loss.

Dependencies

  • MegEngine>=1.3.1
  • tqdm

Data Preparation

RealSR and DRealSR

RealSR and DRealSR has been made public and can be downloaded from their official repo.

D2CRealSR

Our D2CRealSR dataset can be download from Google Drive.

Make Dataset List

Before training and validation, a data list in .txt format needs to be prepared, and input the path of your data list during training and evaluation. You need to prepare data lists for different scale factors as well as for training and validation datasets.

The data list has the following format:

absolute_path_LR absolute_path_HR

——————————————————————————————————————————————————————

For example (RealSR)

    List of x4 scale:
    
        ——————————————————————————————————————————————
        /data/Canon_034_LR4.png /data/Canon_034_HR.png
        /data/Canon_035_LR4.png /data/Canon_035_HR.png
        ...
    
        ——————————————————————————————————————————————
    
    List of x2 scale:
        ——————————————————————————————————————————————
        /data/Canon_034_LR2.png /data/Canon_034_HR.png
        /data/Canon_035_LR2.png /data/Canon_035_HR.png
        ...
        
        ——————————————————————————————————————————————

Training

To train the model, you can run:

python train.py --train_list_path your_train_list_path --val_list_path your_val_list_path --scale 4 --ex_id your_exp_name

Evaluation

For evaluation, load the pretrained checkpoint and run:

python test.py --checkpoint checkpoint_path --val_list_path your_val_list_path

MegEngine checkpoint can be download from Google Drive.

Citations

@inproceedings{li2022d2c,
  title={D2C-SR: A Divergence to Convergence Approach for Real-World Image Super-Resolution},
  author={Li, Youwei and Huang, Haibin and Jia, Lanpeng and Fan, Haoqiang and Liu, Shuaicheng},
  booktitle={European Conference on Computer Vision},
  pages={379--394},
  year={2022},
  organization={Springer}
}

Contact

Contact Email: [email protected]

Acknowledgments

In this project we use (parts of) the official implementations of the following works:

We thank the respective authors for open sourcing their methods.

d2c-sr's People

Contributors

shuaichengliu avatar well-lee-pro avatar zsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ayankumarbhunia

d2c-sr's Issues

Pytorch Version

Thank you for this excellent work. Thank you for sharing the code.

Could you please share the Pytorch version code? Thanks.

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.