# RDN
This repository is implementation of the ["Residual Dense Network for Image Super-Resolution"](https://arxiv.org/abs/1802.08797).
<center><img src="./thumbnails/fig1.png"></center>
<center><img src="./thumbnails/fig2.png"></center>
## Requirements
- PyTorch 1.0.0
- Numpy 1.15.4
- Pillow 5.4.1
- h5py 2.8.0
- tqdm 4.30.0
## Train
The DIV2K, Set5 dataset converted to HDF5 can be downloaded from the links below.
| Dataset | Scale | Type | Link |
|---------|-------|------|------|
| DIV2K | 2 | Train | [Download](https://www.dropbox.com/s/41sn4eie37hp6rh/DIV2K_x2.h5?dl=0) |
| DIV2K | 3 | Train | [Download](https://www.dropbox.com/s/4piy2lvhrjb2e54/DIV2K_x3.h5?dl=0) |
| DIV2K | 4 | Train | [Download](https://www.dropbox.com/s/ie4a6t7f9n5lgco/DIV2K_x4.h5?dl=0) |
| Set5 | 2 | Eval | [Download](https://www.dropbox.com/s/b7v5vis8duh9vwd/Set5_x2.h5?dl=0) |
| Set5 | 3 | Eval | [Download](https://www.dropbox.com/s/768b07ncpdfmgs6/Set5_x3.h5?dl=0) |
| Set5 | 4 | Eval | [Download](https://www.dropbox.com/s/rtu89xyatbb71qv/Set5_x4.h5?dl=0) |
Otherwise, you can use `prepare.py` to create custom dataset.
```bash
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.
| Model | Scale | Link |
|-------|-------|------|
| RDN (D=16, C=8, G=64, G0=64) | 2 | [Download](https://www.dropbox.com/s/pd52pkmaik1ri0h/rdn_x2.pth?dl=0) |
| RDN (D=16, C=8, G=64, G0=64) | 3 | [Download](https://www.dropbox.com/s/56topxdwm6rakwd/rdn_x3.pth?dl=0) |
| RDN (D=16, C=8, G=64, G0=64) | 4 | [Download](https://www.dropbox.com/s/yphiyivb1v7jya2/rdn_x4.pth?dl=0) |
The results are stored in the same path as the query image.
```bash
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. Mat | Scale | RDN (Paper) | RDN (Ours) |
|-----------|-------|-------|-----------------|
| PSNR | 2 | 38.24 | 38.18 |
| PSNR | 3 | 34.71 | 34.73 |
| PSNR | 4 | 32.47 | 32.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}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
RDN-pytor ch: PyTor ch实施残差密集网络以实现图像超分辨率(CVPR 2018) -源码
共17个文件
png:8个
py:6个
gitignore:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 3 下载量 5 浏览量
2022-06-14
15:16:36
上传
评论
收藏 3.57MB ZIP 举报
温馨提示
RDN 该存储库是。 要求 PyTorch 1.0.0 脾气暴躁的1.15.4 枕头5.4.1 h5py 2.8.0 tqdm 4.30.0 火车 可以从下面的链接下载转换为HDF5的DIV2K,Set5数据集。 数据集 规模 类型 关联 DIV2K 2个 火车 DIV2K 3 火车 DIV2K 4 火车 第5集 2个 评估 第5集 3 评估 第5集 4 评估 否则,您可以使用prepare.py创建自定义数据集。 python train.py --train-file " BLAH_BLAH/DIV2K_x4.h5 " \ --eval-file " BLAH_BLAH/Set5_x4.h5 " \ --outputs-dir " BLAH_BLAH/outputs " \
资源推荐
资源详情
资源评论
收起资源包目录
1624067.zip (17个子文件)
22
RDN-pytorch-master
models.py 3KB
utils.py 1KB
data
img_043_rdn_x4.png 939KB
119082_rdn_x4.png 182KB
img_043.png 1.12MB
119082.png 252KB
119082_bicubic_x4.png 155KB
img_043_bicubic_x4.png 848KB
test.py 3KB
train.py 5KB
prepare.py 2KB
datasets.py 3KB
LICENSE 1KB
.gitignore 15B
README.md 4KB
thumbnails
fig1.png 64KB
fig2.png 56KB
共 17 条
- 1
资源评论
- Mr.布2023-04-11感谢资源主分享的资源解决了我当下的问题,非常有用的资源。
- shipeng00002023-02-17这个资源总结的也太全面了吧,内容详实,对我帮助很大。
- halodigi2022-10-04内容与描述一致,超赞的资源,值得借鉴的内容很多,支持!
GZM888888
- 粉丝: 145
- 资源: 2912
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功