Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
cc2c52ed
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cc2c52ed
编写于
7月 25, 2019
作者:
K
Kaipeng Deng
提交者:
GitHub
7月 25, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix infer doc and config default (#2917)
* fix infer doc and config default * refine dataset exists * fix None proc
上级
283b2581
变更
31
隐藏空白更改
内联
并排
Showing
31 changed file
with
54 addition
and
45 deletion
+54
-45
configs/cascade_rcnn_r50_fpn_1x.yml
configs/cascade_rcnn_r50_fpn_1x.yml
+1
-1
configs/faster_rcnn_r101_1x.yml
configs/faster_rcnn_r101_1x.yml
+1
-1
configs/faster_rcnn_r101_fpn_1x.yml
configs/faster_rcnn_r101_fpn_1x.yml
+1
-1
configs/faster_rcnn_r101_fpn_2x.yml
configs/faster_rcnn_r101_fpn_2x.yml
+1
-1
configs/faster_rcnn_r101_vd_fpn_1x.yml
configs/faster_rcnn_r101_vd_fpn_1x.yml
+1
-1
configs/faster_rcnn_r101_vd_fpn_2x.yml
configs/faster_rcnn_r101_vd_fpn_2x.yml
+1
-1
configs/faster_rcnn_r50_1x.yml
configs/faster_rcnn_r50_1x.yml
+1
-1
configs/faster_rcnn_r50_2x.yml
configs/faster_rcnn_r50_2x.yml
+1
-1
configs/faster_rcnn_r50_fpn_1x.yml
configs/faster_rcnn_r50_fpn_1x.yml
+1
-1
configs/faster_rcnn_r50_fpn_2x.yml
configs/faster_rcnn_r50_fpn_2x.yml
+1
-1
configs/faster_rcnn_r50_vd_1x.yml
configs/faster_rcnn_r50_vd_1x.yml
+1
-1
configs/faster_rcnn_r50_vd_fpn_2x.yml
configs/faster_rcnn_r50_vd_fpn_2x.yml
+1
-1
configs/faster_rcnn_se154_vd_fpn_s1x.yml
configs/faster_rcnn_se154_vd_fpn_s1x.yml
+1
-1
configs/faster_rcnn_x101_vd_64x4d_fpn_1x.yml
configs/faster_rcnn_x101_vd_64x4d_fpn_1x.yml
+1
-1
configs/faster_rcnn_x101_vd_64x4d_fpn_2x.yml
configs/faster_rcnn_x101_vd_64x4d_fpn_2x.yml
+1
-1
configs/mask_rcnn_r101_fpn_1x.yml
configs/mask_rcnn_r101_fpn_1x.yml
+1
-1
configs/mask_rcnn_r50_1x.yml
configs/mask_rcnn_r50_1x.yml
+1
-1
configs/mask_rcnn_r50_2x.yml
configs/mask_rcnn_r50_2x.yml
+1
-1
configs/mask_rcnn_r50_fpn_1x.yml
configs/mask_rcnn_r50_fpn_1x.yml
+1
-1
configs/mask_rcnn_r50_fpn_2x.yml
configs/mask_rcnn_r50_fpn_2x.yml
+1
-1
configs/mask_rcnn_r50_vd_fpn_2x.yml
configs/mask_rcnn_r50_vd_fpn_2x.yml
+1
-1
configs/mask_rcnn_se154_vd_fpn_s1x.yml
configs/mask_rcnn_se154_vd_fpn_s1x.yml
+1
-1
configs/retinanet_r101_fpn_1x.yml
configs/retinanet_r101_fpn_1x.yml
+1
-1
configs/retinanet_r50_fpn_1x.yml
configs/retinanet_r50_fpn_1x.yml
+1
-1
configs/yolov3_darknet.yml
configs/yolov3_darknet.yml
+1
-1
configs/yolov3_mobilenet_v1.yml
configs/yolov3_mobilenet_v1.yml
+1
-1
configs/yolov3_r34.yml
configs/yolov3_r34.yml
+1
-1
docs/GETTING_STARTED.md
docs/GETTING_STARTED.md
+1
-1
docs/GETTING_STARTED_cn.md
docs/GETTING_STARTED_cn.md
+1
-1
ppdet/data/data_feed.py
ppdet/data/data_feed.py
+8
-5
ppdet/utils/download.py
ppdet/utils/download.py
+17
-11
未找到文件。
configs/cascade_rcnn_r50_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -129,7 +129,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_r101_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -112,4 +112,4 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/faster_rcnn_r101_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -129,7 +129,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_r101_fpn_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -129,7 +129,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_r101_vd_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -130,7 +130,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_r101_vd_fpn_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -130,7 +130,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_r50_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -112,4 +112,4 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/faster_rcnn_r50_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -112,4 +112,4 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/faster_rcnn_r50_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -129,7 +129,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_r50_fpn_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -129,7 +129,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
coco/annotations/instances_val2017.json
annotation
:
dataset/coco/
coco/annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_r50_vd_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -114,4 +114,4 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/faster_rcnn_r50_vd_fpn_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -130,7 +130,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_se154_vd_fpn_s1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -132,7 +132,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_x101_vd_64x4d_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -134,7 +134,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/faster_rcnn_x101_vd_64x4d_fpn_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -133,7 +133,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/mask_rcnn_r101_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -136,7 +136,7 @@ MaskRCNNEvalFeed:
MaskRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/mask_rcnn_r50_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -120,4 +120,4 @@ MaskRCNNEvalFeed:
MaskRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/mask_rcnn_r50_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -122,4 +122,4 @@ MaskRCNNEvalFeed:
MaskRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/mask_rcnn_r50_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -136,7 +136,7 @@ MaskRCNNEvalFeed:
MaskRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/mask_rcnn_r50_fpn_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -136,7 +136,7 @@ MaskRCNNEvalFeed:
MaskRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/mask_rcnn_r50_vd_fpn_2x.yml
浏览文件 @
cc2c52ed
...
...
@@ -138,7 +138,7 @@ MaskRCNNEvalFeed:
MaskRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/mask_rcnn_se154_vd_fpn_s1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -140,7 +140,7 @@ MaskRCNNEvalFeed:
MaskRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
32
...
...
configs/retinanet_r101_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -101,5 +101,5 @@ FasterRCNNTestFeed:
-
!PadBatch
pad_to_stride
:
128
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
num_workers
:
2
configs/retinanet_r50_fpn_1x.yml
浏览文件 @
cc2c52ed
...
...
@@ -98,7 +98,7 @@ FasterRCNNEvalFeed:
FasterRCNNTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
batch_transforms
:
-
!PadBatch
pad_to_stride
:
128
...
...
configs/yolov3_darknet.yml
浏览文件 @
cc2c52ed
...
...
@@ -77,4 +77,4 @@ YoloEvalFeed:
YoloTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/yolov3_mobilenet_v1.yml
浏览文件 @
cc2c52ed
...
...
@@ -78,4 +78,4 @@ YoloEvalFeed:
YoloTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
configs/yolov3_r34.yml
浏览文件 @
cc2c52ed
...
...
@@ -80,4 +80,4 @@ YoloEvalFeed:
YoloTestFeed
:
batch_size
:
1
dataset
:
annotation
:
annotations/instances_val2017.json
annotation
:
dataset/coco/
annotations/instances_val2017.json
docs/GETTING_STARTED.md
浏览文件 @
cc2c52ed
...
...
@@ -71,7 +71,7 @@ python tools/infer.py -c configs/faster_rcnn_r50_1x.yml --infer_dir=demo
```
The visualization files are saved in
`output`
by default, to specify a different
path, simply add a
`--
save_file
=`
flag.
path, simply add a
`--
output_dir
=`
flag.
-
Save inference model
...
...
docs/GETTING_STARTED_cn.md
浏览文件 @
cc2c52ed
...
...
@@ -68,7 +68,7 @@ export CUDA_VISIBLE_DEVICES=0
python tools/infer.py
-c
configs/faster_rcnn_r50_1x.yml
--infer_dir
=
demo
```
可视化文件默认保存在
`output`
中,可通过
`--
save_file
=`
指定不同的输出路径。
可视化文件默认保存在
`output`
中,可通过
`--
output_dir
=`
指定不同的输出路径。
-
保存推断模型
...
...
ppdet/data/data_feed.py
浏览文件 @
cc2c52ed
...
...
@@ -52,11 +52,14 @@ def create_reader(feed, max_iter=0):
# if `DATASET_DIR` does not exists, search ~/.paddle/dataset for a directory
# named `DATASET_DIR` (e.g., coco, pascal), if not present either, download
if
feed
.
dataset
.
dataset_dir
:
dataset_dir
=
get_dataset_path
(
feed
.
dataset
.
dataset_dir
)
feed
.
dataset
.
annotation
=
os
.
path
.
join
(
dataset_dir
,
feed
.
dataset
.
annotation
)
feed
.
dataset
.
image_dir
=
os
.
path
.
join
(
dataset_dir
,
feed
.
dataset
.
image_dir
)
annotation
=
getattr
(
feed
.
dataset
,
'annotation'
,
None
)
image_dir
=
getattr
(
feed
.
dataset
,
'image_dir'
,
None
)
dataset_dir
=
get_dataset_path
(
feed
.
dataset
.
dataset_dir
,
annotation
,
image_dir
)
if
annotation
:
feed
.
dataset
.
annotation
=
os
.
path
.
join
(
dataset_dir
,
annotation
)
if
image_dir
:
feed
.
dataset
.
image_dir
=
os
.
path
.
join
(
dataset_dir
,
image_dir
)
mixup_epoch
=
-
1
if
getattr
(
feed
,
'mixup_epoch'
,
None
)
is
not
None
:
...
...
ppdet/utils/download.py
浏览文件 @
cc2c52ed
...
...
@@ -67,14 +67,13 @@ def get_weights_path(url):
return
get_path
(
url
,
WEIGHTS_HOME
)
def
get_dataset_path
(
path
):
def
get_dataset_path
(
path
,
annotation
,
image_dir
):
"""
If path exists, return path.
Otherwise, get dataset path from DATASET_HOME, if not exists,
download it.
"""
if
_dataset_exists
(
path
):
logger
.
debug
(
"Dataset path: {}"
.
format
(
osp
.
realpath
(
path
)))
if
_dataset_exists
(
path
,
annotation
,
image_dir
):
return
path
logger
.
info
(
"Dataset {} not exitst, try searching {} or "
...
...
@@ -82,7 +81,7 @@ def get_dataset_path(path):
osp
.
realpath
(
path
),
DATASET_HOME
))
for
name
,
dataset
in
DATASETS
.
items
():
if
path
.
lower
().
find
(
name
)
>=
0
:
if
os
.
path
.
split
(
path
.
strip
().
lower
())[
-
1
]
==
name
:
logger
.
info
(
"Parse dataset_dir {} as dataset "
"{}"
.
format
(
path
,
name
))
data_dir
=
osp
.
join
(
DATASET_HOME
,
name
)
...
...
@@ -163,19 +162,26 @@ def get_path(url, root_dir, md5sum=None):
return
fullpath
def
_dataset_exists
(
path
):
def
_dataset_exists
(
path
,
annotation
,
image_dir
):
"""
Check if user define dataset exists
"""
if
not
osp
.
exists
(
path
):
logger
.
info
(
"Config dataset_dir {} not exits"
.
format
(
path
))
return
False
for
name
,
dataset
in
DATASETS
.
items
():
if
path
.
lower
().
find
(
name
)
>=
0
:
for
sub_dir
in
dataset
[
1
]:
if
not
osp
.
exists
(
osp
.
join
(
path
,
sub_dir
)):
return
False
return
True
if
annotation
:
annotation_path
=
osp
.
join
(
path
,
annotation
)
if
not
osp
.
isfile
(
annotation_path
):
logger
.
info
(
"Config annotation {} is not a "
"file"
.
format
(
annotation_path
))
return
False
if
image_dir
:
image_path
=
osp
.
join
(
path
,
image_dir
)
if
not
osp
.
isdir
(
image_path
):
logger
.
info
(
"Config image_dir {} is not a "
"directory"
.
format
(
image_path
))
return
False
return
True
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录