Skip to content

add SRCNN model#1340

Open
molly00ecla wants to merge 8 commits intoPaddlePaddle:dev-staticfrom
molly00ecla:develop
Open

add SRCNN model#1340
molly00ecla wants to merge 8 commits intoPaddlePaddle:dev-staticfrom
molly00ecla:develop

Conversation

@molly00ecla
Copy link

add SRCNN code and README.md


## 数据准备
模型使用timofte作为训练任务的数据,使用set5或set14作为验证任务的数据。
数据存放结构如下:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要给出数据下载脚本,保证新手可以方便下载到数据,

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已添加,数据集暂无公开的下载链接,所以上传到百度云。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要给出数据下载脚本,保证新手可以方便下载到数据,

已添加,数据集暂无公开的下载链接,所以上传到百度云。


下图是使用`infer.py`脚本预测产生的结果示例,其中,第一行是输入的原始图片,第二行是输入图片经过subsample的结果,第三行是超分辨率重构的结果。

![0.png-101.2kB](http://static.zybuluo.com/molly-ecla/th1u9o27tnfrn5vmn7wakqj8/0.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议将图片放到当前repo下。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议将图片放到当前repo下。

已添加到当前repo下


add_arg('checkpoint_path', str, 'model', "Checkpoint save path.")
add_arg('image_path', str, 'data/val_dataset/set5/baby_GT.bmp', "Img data path.")
add_arg('show_img', bool, True, "show img or not")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认不要窗口展示图片了,一般用的环境默认没有UI.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认不要窗口展示图片了,一般用的环境默认没有UI.

默认设置为False,并修改了这个参数不生效的bug


def net(X, Y, model_struct):
# construct net
conv1 = fluid.layers.nn.conv2d(X, model_struct.n1, model_struct.f1, act='relu', name='conv1' ,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fluid.layers.nn.conv2d -> fluid.layers.conv2d
可以不用nn

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fluid.layers.nn.conv2d -> fluid.layers.conv2d
可以不用nn

已修改API

Copy link
Contributor

@wanghaoshuang wanghaoshuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghaoshuang
Copy link
Contributor

稍后我们会将该工作merge到contribute目录。

@CLAassistant
Copy link

CLAassistant commented Mar 24, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

@pancreatic-cystic-lesion pancreatic-cystic-lesion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the model of the super-resolution domain, and I'm glad to see the implementation code, but please update the data download link

## 数据准备
模型使用timofte作为训练任务的数据,使用set5或set14作为验证任务的数据。数据集获取难度较大,可以通过下面的下载地址下载:

链接:https://pan.baidu.com/s/1rynLdqzsbyPamJnKOIwNiA

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link has expired, please update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants