Home

Awesome

RDN

This repository is implementation of the "Residual Dense Network for Image Super-Resolution".

<center><img src="./thumbnails/fig1.png"></center> <center><img src="./thumbnails/fig2.png"></center>

Requirements

Train

The DIV2K, Set5 dataset converted to HDF5 can be downloaded from the links below.

DatasetScaleTypeLink
DIV2K2TrainDownload
DIV2K3TrainDownload
DIV2K4TrainDownload
Set52EvalDownload
Set53EvalDownload
Set54EvalDownload

Otherwise, you can use prepare.py to create custom dataset.

python train.py --train-file "BLAH_BLAH/DIV2K_x4.h5" \
                --eval-file "BLAH_BLAH/Set5_x4.h5" \
                --outputs-dir "BLAH_BLAH/outputs" \
                --scale 4 \
                --num-features 64 \
                --growth-rate 64 \
                --num-blocks 16 \
                --num-layers 8 \
                --lr 1e-4 \
                --batch-size 16 \
                --patch-size 32 \
                --num-epochs 800 \
                --num-workers 8 \
                --seed 123                

Test

Pre-trained weights can be downloaded from the links below.

ModelScaleLink
RDN (D=16, C=8, G=64, G0=64)2Download
RDN (D=16, C=8, G=64, G0=64)3Download
RDN (D=16, C=8, G=64, G0=64)4Download

The results are stored in the same path as the query image.

python test.py --weights-file "BLAH_BLAH/rdn_x4.pth" \
               --image-file "data/119082.png" \
               --scale 4 \
               --num-features 64 \
               --growth-rate 64 \
               --num-blocks 16 \
               --num-layers 8

Results

PSNR was calculated on the Y channel.

Set5

Eval. MatScaleRDN (Paper)RDN (Ours)
PSNR238.2438.18
PSNR334.7134.73
PSNR432.4732.40
<table> <tr> <td><center>Original</center></td> <td><center>BICUBIC x4</center></td> <td><center>RDN x4 (25.08 dB)</center></td> </tr> <tr> <td> <center><img src="./data/119082.png""></center> </td> <td> <center><img src="./data/119082_bicubic_x4.png"></center> </td> <td> <center><img src="./data/119082_rdn_x4.png"></center> </td> </tr> <tr> <td><center>Original</center></td> <td><center>BICUBIC x4</center></td> <td><center>RDN x4 (32.98 dB)</center></td> </tr> <tr> <td> <center><img src="./data/img_043.png""></center> </td> <td> <center><img src="./data/img_043_bicubic_x4.png"></center> </td> <td> <center><img src="./data/img_043_rdn_x4.png"></center> </td> </tr> </table>

Citation

@InProceedings{Lim_2017_CVPR_Workshops,
  author = {Lim, Bee and Son, Sanghyun and Kim, Heewon and Nah, Seungjun and Lee, Kyoung Mu},
  title = {Enhanced Deep Residual Networks for Single Image Super-Resolution},
  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
  month = {July},
  year = {2017}
}

@inproceedings{zhang2018residual,
    title={Residual Dense Network for Image Super-Resolution},
    author={Zhang, Yulun and Tian, Yapeng and Kong, Yu and Zhong, Bineng and Fu, Yun},
    booktitle={CVPR},
    year={2018}
}

@article{zhang2020rdnir,
    title={Residual Dense Network for Image Restoration},
    author={Zhang, Yulun and Tian, Yapeng and Kong, Yu and Zhong, Bineng and Fu, Yun},
    journal={TPAMI},
    year={2020}
}