Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
fd1dd13e
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fd1dd13e
编写于
9月 04, 2020
作者:
C
cnn
提交者:
GitHub
9月 04, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add roadsign_voc dataset (#1353)
* add roadsign_voc dataset * fix some typo
上级
56cbc020
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
45 addition
and
6 deletion
+45
-6
dataset/roadsign_voc/download_roadsign_voc.py
dataset/roadsign_voc/download_roadsign_voc.py
+28
-0
dataset/roadsign_voc/label_list.txt
dataset/roadsign_voc/label_list.txt
+4
-0
ppdet/utils/download.py
ppdet/utils/download.py
+13
-6
未找到文件。
dataset/roadsign_voc/download_roadsign_voc.py
0 → 100644
浏览文件 @
fd1dd13e
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
sys
import
os.path
as
osp
import
logging
# add python path of PadleDetection to sys.path
parent_path
=
osp
.
abspath
(
osp
.
join
(
__file__
,
*
([
'..'
]
*
3
)))
if
parent_path
not
in
sys
.
path
:
sys
.
path
.
append
(
parent_path
)
from
ppdet.utils.download
import
download_dataset
logging
.
basicConfig
(
level
=
logging
.
INFO
)
download_path
=
osp
.
split
(
osp
.
realpath
(
sys
.
argv
[
0
]))[
0
]
download_dataset
(
download_path
,
'roadsign_voc'
)
dataset/roadsign_voc/label_list.txt
0 → 100644
浏览文件 @
fd1dd13e
speedlimit
crosswalk
trafficlight
stop
\ No newline at end of file
ppdet/utils/download.py
浏览文件 @
fd1dd13e
...
...
@@ -78,6 +78,12 @@ DATASETS = {
'https://dataset.bj.bcebos.com/PaddleDetection_demo/fruit.tar'
,
'baa8806617a54ccf3685fa7153388ae6'
,
),
],
[
'Annotations'
,
'JPEGImages'
]),
'roadsign_voc'
:
([(
'https://paddlemodels.bj.bcebos.com/object_detection/roadsign_voc.tar'
,
'8d629c0f880dd8b48de9aeff44bf1f3e'
,
),
],
[
'annotations'
,
'images'
]),
'roadsign_coco'
:
([(
'https://paddlemodels.bj.bcebos.com/object_detection/roadsign_coco.tar'
,
'49ce5a9b5ad0d6266163cd01de4b018e'
,
),
],
[
'annotations'
,
'images'
]),
'objects365'
:
(),
}
...
...
@@ -117,7 +123,7 @@ def get_dataset_path(path, annotation, image_dir):
"https://www.objects365.org/download.html"
.
format
(
name
))
data_dir
=
osp
.
join
(
DATASET_HOME
,
name
)
# For voc, only check dir VOCdevkit/VOC2012, VOCdevkit/VOC2007
if
name
==
'voc'
or
name
==
'fruit'
:
if
name
==
'voc'
or
name
==
'fruit'
or
name
==
'roadsign_voc'
:
exists
=
True
for
sub_dir
in
dataset
[
1
]:
check_dir
=
osp
.
join
(
data_dir
,
sub_dir
)
...
...
@@ -129,7 +135,7 @@ def get_dataset_path(path, annotation, image_dir):
return
data_dir
# voc exist is checked above, voc is not exist here
check_exist
=
name
!=
'voc'
and
name
!=
'fruit'
check_exist
=
name
!=
'voc'
and
name
!=
'fruit'
and
name
!=
'roadsign_voc'
for
url
,
md5sum
in
dataset
[
0
]:
get_path
(
url
,
data_dir
,
md5sum
,
check_exist
)
...
...
@@ -139,10 +145,11 @@ def get_dataset_path(path, annotation, image_dir):
return
data_dir
# not match any dataset in DATASETS
raise
ValueError
(
"Dataset {} is not valid and cannot parse dataset type "
"'{}' for automaticly downloading, which only supports "
"'voc' , 'coco', 'wider_face' and 'fruit' currently"
.
format
(
path
,
osp
.
split
(
path
)[
-
1
]))
raise
ValueError
(
"Dataset {} is not valid and cannot parse dataset type "
"'{}' for automaticly downloading, which only supports "
"'voc' , 'coco', 'wider_face', 'fruit' and 'roadsign_voc' currently"
.
format
(
path
,
osp
.
split
(
path
)[
-
1
]))
def
create_voc_list
(
data_dir
,
devkit_subdir
=
'VOCdevkit'
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录