Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSeg
提交
6b4a7f02
P
PaddleSeg
项目概览
PaddlePaddle
/
PaddleSeg
通知
286
Star
8
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
53
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleSeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
53
Issue
53
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6b4a7f02
编写于
6月 17, 2020
作者:
C
chenguowei01
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add cityscapes dataset
上级
d2ed4fbf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
10 deletion
+22
-10
dygraph/infer.py
dygraph/infer.py
+7
-3
dygraph/train.py
dygraph/train.py
+8
-4
dygraph/val.py
dygraph/val.py
+7
-3
未找到文件。
dygraph/infer.py
浏览文件 @
6b4a7f02
...
...
@@ -22,7 +22,7 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
import
cv2
import
tqdm
from
datasets
import
OpticDiscSeg
from
datasets
import
OpticDiscSeg
,
Cityscapes
import
transforms
as
T
import
models
import
utils
...
...
@@ -45,7 +45,8 @@ def parse_args():
parser
.
add_argument
(
'--dataset'
,
dest
=
'dataset'
,
help
=
'The dataset you want to train'
,
help
=
"The dataset you want to train, which is one of ('OpticDiscSeg', 'Cityscapes')"
,
type
=
str
,
default
=
'OpticDiscSeg'
)
...
...
@@ -134,9 +135,12 @@ def main(args):
if
args
.
dataset
.
lower
()
==
'opticdiscseg'
:
dataset
=
OpticDiscSeg
elif
args
.
dataset
.
lower
()
==
'cityscapes'
:
dataset
=
Cityscapes
else
:
raise
Exception
(
"The --dataset set wrong. It should be one of ('OpticDiscSeg',)"
)
"The --dataset set wrong. It should be one of ('OpticDiscSeg', 'Cityscapes')"
)
with
fluid
.
dygraph
.
guard
(
places
):
test_transforms
=
T
.
Compose
([
T
.
Resize
(
args
.
input_size
),
T
.
Normalize
()])
...
...
dygraph/train.py
浏览文件 @
6b4a7f02
...
...
@@ -20,7 +20,7 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
from
paddle.fluid.io
import
DataLoader
from
paddle.incubate.hapi.distributed
import
DistributedBatchSampler
from
datasets
import
OpticDiscSeg
from
datasets
import
OpticDiscSeg
,
Cityscapes
import
transforms
as
T
import
models
import
utils.logging
as
logging
...
...
@@ -38,13 +38,14 @@ def parse_args():
dest
=
'model_name'
,
help
=
"Model type for traing, which is one of ('UNet')"
,
type
=
str
,
default
=
'
OpticDiscSeg
'
)
default
=
'
UNet
'
)
# params of dataset
parser
.
add_argument
(
'--dataset'
,
dest
=
'dataset'
,
help
=
'The dataset you want to train'
,
help
=
"The dataset you want to train, which is one of ('OpticDiscSeg', 'Cityscapes')"
,
type
=
str
,
default
=
'OpticDiscSeg'
)
...
...
@@ -194,9 +195,12 @@ def main(args):
if
args
.
dataset
.
lower
()
==
'opticdiscseg'
:
dataset
=
OpticDiscSeg
elif
args
.
dataset
.
lower
()
==
'cityscapes'
:
dataset
=
Cityscapes
else
:
raise
Exception
(
"The --dataset set wrong. It should be one of ('OpticDiscSeg',)"
)
"The --dataset set wrong. It should be one of ('OpticDiscSeg', 'Cityscapes')"
)
with
fluid
.
dygraph
.
guard
(
places
):
# Creat dataset reader
...
...
dygraph/val.py
浏览文件 @
6b4a7f02
...
...
@@ -23,7 +23,7 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
from
paddle.fluid.io
import
DataLoader
from
paddle.fluid.dataloader
import
BatchSampler
from
datasets
import
OpticDiscSeg
from
datasets
import
OpticDiscSeg
,
Cityscapes
import
transforms
as
T
import
models
import
utils.logging
as
logging
...
...
@@ -46,7 +46,8 @@ def parse_args():
parser
.
add_argument
(
'--dataset'
,
dest
=
'dataset'
,
help
=
'The dataset you want to evaluation'
,
help
=
"The dataset you want to evaluation, which is one of ('OpticDiscSeg', 'Cityscapes')"
,
type
=
str
,
default
=
'OpticDiscSeg'
)
...
...
@@ -132,9 +133,12 @@ def main(args):
if
args
.
dataset
.
lower
()
==
'opticdiscseg'
:
dataset
=
OpticDiscSeg
elif
args
.
dataset
.
lower
()
==
'cityscapes'
:
dataset
=
Cityscapes
else
:
raise
Exception
(
"The --dataset set wrong. It should be one of ('OpticDiscSeg',)"
)
"The --dataset set wrong. It should be one of ('OpticDiscSeg', 'Cityscapes')"
)
with
fluid
.
dygraph
.
guard
(
places
):
eval_transforms
=
T
.
Compose
([
T
.
Resize
(
args
.
input_size
),
T
.
Normalize
()])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录