Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleGAN
提交
6cee870f
P
PaddleGAN
项目概览
PaddlePaddle
/
PaddleGAN
大约 1 年 前同步成功
通知
97
Star
7254
Fork
1210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleGAN
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6cee870f
编写于
2月 06, 2021
作者:
L
LielinJiang
提交者:
GitHub
2月 06, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add realsr docs (#159)
上级
af98f013
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
15 deletion
+28
-15
configs/realsr_bicubic_noise_x4_df2k.yaml
configs/realsr_bicubic_noise_x4_df2k.yaml
+3
-3
configs/realsr_kernel_noise_x4_dped.yaml
configs/realsr_kernel_noise_x4_dped.yaml
+3
-3
data/lsr2_preprocess.py
data/lsr2_preprocess.py
+0
-0
data/realsr_preprocess/collect_noise.py
data/realsr_preprocess/collect_noise.py
+2
-1
data/realsr_preprocess/create_bicubic_dataset.py
data/realsr_preprocess/create_bicubic_dataset.py
+4
-2
data/realsr_preprocess/paths.yml
data/realsr_preprocess/paths.yml
+6
-6
docs/en_US/tutorials/super_resolution.md
docs/en_US/tutorials/super_resolution.md
+10
-0
未找到文件。
configs/realsr_bicubic_noise_x4_df2k.yaml
浏览文件 @
6cee870f
...
...
@@ -34,8 +34,8 @@ model:
dataset
:
train
:
name
:
SRDataset
gt_folder
:
data/
realsr_preprocess/DF2K/generated/tdsr/HR_sub
/
lq_folder
:
data/
realsr_preprocess/DF2K/generated/tdsr/LR_sub
/
gt_folder
:
data/
DF2K/generated/tdsr/HR
/
lq_folder
:
data/
DF2K/generated/tdsr/LR
/
num_workers
:
4
batch_size
:
16
scale
:
4
...
...
@@ -64,7 +64,7 @@ dataset:
std
:
[
255.
,
255.
,
255.
]
keys
:
[
image
,
image
]
-
name
:
SRNoise
noise_path
:
data/
realsr_preprocess/
DF2K/Corrupted_noise/
noise_path
:
data/DF2K/Corrupted_noise/
size
:
32
keys
:
[
image
]
test
:
...
...
configs/realsr_kernel_noise_x4_dped.yaml
浏览文件 @
6cee870f
...
...
@@ -34,8 +34,8 @@ model:
dataset
:
train
:
name
:
SRDataset
gt_folder
:
data/
realsr_preprocess/
DPED/generated/clean/train_tdsr/HR/
lq_folder
:
data/
realsr_preprocess/
DPED/generated/clean/train_tdsr/LR/
gt_folder
:
data/DPED/generated/clean/train_tdsr/HR/
lq_folder
:
data/DPED/generated/clean/train_tdsr/LR/
num_workers
:
4
batch_size
:
16
scale
:
4
...
...
@@ -64,7 +64,7 @@ dataset:
std
:
[
255.
,
255.
,
255.
]
keys
:
[
image
,
image
]
-
name
:
SRNoise
noise_path
:
data/
realsr_preprocess/
DPED/DPEDiphone_noise/
noise_path
:
data/DPED/DPEDiphone_noise/
size
:
32
keys
:
[
image
]
test
:
...
...
lsr2_preprocess.py
→
data/
lsr2_preprocess.py
浏览文件 @
6cee870f
文件已移动
data/realsr_preprocess/collect_noise.py
浏览文件 @
6cee870f
...
...
@@ -27,7 +27,8 @@ parser.add_argument('--upscale_factor',
opt
=
parser
.
parse_args
()
# define input and target directories
with
open
(
'./preprocess/paths.yml'
,
'r'
)
as
stream
:
cur_path
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
with
open
(
os
.
path
.
join
(
cur_path
,
'./paths.yml'
),
'r'
)
as
stream
:
PATHS
=
yaml
.
load
(
stream
)
...
...
data/realsr_preprocess/create_bicubic_dataset.py
浏览文件 @
6cee870f
...
...
@@ -48,7 +48,8 @@ parser.add_argument('--upscale_factor',
opt
=
parser
.
parse_args
()
# define input and target directories
with
open
(
'./paths.yml'
,
'r'
)
as
stream
:
cur_path
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
with
open
(
os
.
path
.
join
(
cur_path
,
'./paths.yml'
),
'r'
)
as
stream
:
PATHS
=
yaml
.
load
(
stream
)
if
opt
.
dataset
==
'df2k'
:
...
...
@@ -82,7 +83,8 @@ else:
tdsr_hr_dir
=
path_tdsr
+
'HR'
tdsr_lr_dir
=
path_tdsr
+
'LR'
assert
not
os
.
path
.
exists
(
PATHS
[
'datasets'
][
opt
.
dataset
])
assert
not
os
.
path
.
exists
(
tdsr_hr_dir
)
assert
not
os
.
path
.
exists
(
tdsr_lr_dir
)
if
not
os
.
path
.
exists
(
tdsr_hr_dir
):
os
.
makedirs
(
tdsr_hr_dir
)
...
...
data/realsr_preprocess/paths.yml
浏览文件 @
6cee870f
df2k
:
tdsr
:
source
:
'
/workspace/datasets
/ntire20/Corrupted-tr-x'
target
:
'
/workspace/datasets
/ntire20/Corrupted-tr-y'
source
:
'
./data
/ntire20/Corrupted-tr-x'
target
:
'
./data
/ntire20/Corrupted-tr-y'
valid
:
dped
:
clean
:
hr
:
train
:
'
/workspace/datasets
/ntire20/DPEDiphone-tr-x'
valid
:
'
/workspace
/datasets/ntire20/DPEDiphone-va'
train
:
'
./data
/ntire20/DPEDiphone-tr-x'
valid
:
'
./data
/datasets/ntire20/DPEDiphone-va'
datasets
:
df2k
:
'
DF2K'
dped
:
'
DPED'
df2k
:
'
data/
DF2K'
dped
:
'
data/
DPED'
docs/en_US/tutorials/super_resolution.md
浏览文件 @
6cee870f
...
...
@@ -52,6 +52,16 @@
python data/process_div2k_data.py --data-root data/DIV2K
```
Prepare dataset for realsr df2k model:
Download dataset from
[
NTIRE 2020 RWSR
](
https://competitions.codalab.org/competitions/22220#participate
)
and unzip it to your path.
Unzip Corrupted-tr-x.zip and Corrupted-tr-y.zip to
``PaddleGAN/data/ntire20``
directory.
Run the following commands:
```
python ./data/realsr_preprocess/create_bicubic_dataset.py --dataset df2k --artifacts tdsr
python ./data/realsr_preprocess/collect_noise.py --dataset df2k --artifacts tdsr
```
### 1.2.2 Train/Test
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录