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.
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.
- MegEngine>=1.3.1
- tqdm
RealSR and DRealSR has been made public and can be downloaded from their official repo.
Our D2CRealSR dataset can be download from Google Drive.
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
...
——————————————————————————————————————————————
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
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.
@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 Email: liyouwei.wellee@gmail.com
In this project we use (parts of) the official implementations of the following works:
We thank the respective authors for open sourcing their methods.