Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
630304e0
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看板
未验证
提交
630304e0
编写于
12月 26, 2022
作者:
F
Feng Ni
提交者:
GitHub
12月 26, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix auto download logger info (#7550)
上级
4497f183
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
26 deletion
+12
-26
ppdet/utils/download.py
ppdet/utils/download.py
+12
-26
未找到文件。
ppdet/utils/download.py
浏览文件 @
630304e0
...
...
@@ -99,13 +99,13 @@ DATASETS = {
'spine_coco'
:
([(
'https://paddledet.bj.bcebos.com/data/spine.tar'
,
'8a3a353c2c54a2284ad7d2780b65f6a6'
,
),
],
[
'annotations'
,
'images'
]),
'mot'
:
(),
'objects365'
:
(),
'coco_ce'
:
([(
'https://paddledet.bj.bcebos.com/data/coco_ce.tar'
,
'eadd1b79bc2f069f2744b1dd4e0c0329'
,
),
],
[])
}
DOWNLOAD_DATASETS_LIST
=
DATASETS
.
keys
()
DOWNLOAD_RETRY_LIMIT
=
3
PPDET_WEIGHTS_DOWNLOAD_URL_PREFIX
=
'https://paddledet.bj.bcebos.com/'
...
...
@@ -185,31 +185,22 @@ def get_dataset_path(path, annotation, image_dir):
if
_dataset_exists
(
path
,
annotation
,
image_dir
):
return
path
logger
.
info
(
"Dataset {} is not valid for reason above, try searching {} or "
"downloading dataset..."
.
format
(
osp
.
realpath
(
path
),
DATASET_HOME
))
data_name
=
os
.
path
.
split
(
path
.
strip
().
lower
())[
-
1
]
if
data_name
not
in
DOWNLOAD_DATASETS_LIST
:
raise
ValueError
(
"Dataset {} is not valid for reason above, please check again."
.
format
(
osp
.
realpath
(
path
)))
else
:
logger
.
WARNING
(
"Dataset {} is not valid for reason above, try searching {} or "
"downloading dataset..."
.
format
(
osp
.
realpath
(
path
),
DATASET_HOME
))
for
name
,
dataset
in
DATASETS
.
items
():
if
data_name
==
name
:
logger
.
debug
(
"Parse dataset_dir {} as dataset "
"{}"
.
format
(
path
,
name
))
if
name
==
'objects365'
:
raise
NotImplementedError
(
"Dataset {} is not valid for download automatically. "
"Please apply and download the dataset from "
"https://www.objects365.org/download.html"
.
format
(
name
))
data_dir
=
osp
.
join
(
DATASET_HOME
,
name
)
if
name
==
'mot'
:
if
osp
.
exists
(
path
)
or
osp
.
exists
(
data_dir
):
return
data_dir
else
:
raise
NotImplementedError
(
"Dataset {} is not valid for download automatically. "
"Please apply and download the dataset following docs/tutorials/PrepareMOTDataSet.md"
.
format
(
name
))
if
name
==
"spine_coco"
:
if
_dataset_exists
(
data_dir
,
annotation
,
image_dir
):
return
data_dir
...
...
@@ -236,12 +227,7 @@ def get_dataset_path(path, annotation, image_dir):
create_voc_list
(
data_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', 'fruit', 'roadsign_voc' and 'mot' currently"
.
format
(
path
,
osp
.
split
(
path
)[
-
1
]))
raise
ValueError
(
"Dataset automaticly downloading Error."
)
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录