Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
edd24ca1
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看板
未验证
提交
edd24ca1
编写于
4月 17, 2021
作者:
W
wangguanzhong
提交者:
GitHub
4月 17, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
simplify log of loading weights (#2673)
上级
762d0152
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
13 addition
and
21 deletion
+13
-21
README_en.md
README_en.md
+1
-1
ppdet/data/source/dataset.py
ppdet/data/source/dataset.py
+0
-1
ppdet/utils/checkpoint.py
ppdet/utils/checkpoint.py
+12
-19
未找到文件。
README_en.md
浏览文件 @
edd24ca1
...
@@ -188,7 +188,7 @@ The relationship between COCO mAP and FPS on Tesla V100 of representative models
...
@@ -188,7 +188,7 @@ The relationship between COCO mAP and FPS on Tesla V100 of representative models
-
`PP-YOLO`
achieves mAP of 45.9% on COCO and 72.9FPS on Tesla V100. Both precision and speed surpass
[
YOLOv4
](
https://arxiv.org/abs/2004.10934
)
-
`PP-YOLO`
achieves mAP of 45.9% on COCO and 72.9FPS on Tesla V100. Both precision and speed surpass
[
YOLOv4
](
https://arxiv.org/abs/2004.10934
)
-
`PP-YOLO v2`
is optimized version of
`PP-YOLO`
which has mAP of 49.5% and 6
0
FPS on Tesla V100
-
`PP-YOLO v2`
is optimized version of
`PP-YOLO`
which has mAP of 49.5% and 6
8.9
FPS on Tesla V100
-
All these models can be get in
[
Model Zoo
](
#ModelZoo
)
-
All these models can be get in
[
Model Zoo
](
#ModelZoo
)
...
...
ppdet/data/source/dataset.py
浏览文件 @
edd24ca1
...
@@ -82,7 +82,6 @@ class DetDataset(Dataset):
...
@@ -82,7 +82,6 @@ class DetDataset(Dataset):
r
[
'curr_iter'
]
=
self
.
_curr_iter
r
[
'curr_iter'
]
=
self
.
_curr_iter
else
:
else
:
roidb
[
'curr_iter'
]
=
self
.
_curr_iter
roidb
[
'curr_iter'
]
=
self
.
_curr_iter
roidb
[
'curr_iter'
]
=
self
.
_curr_iter
self
.
_curr_iter
+=
1
self
.
_curr_iter
+=
1
return
self
.
transform
(
roidb
)
return
self
.
transform
(
roidb
)
...
...
ppdet/utils/checkpoint.py
浏览文件 @
edd24ca1
...
@@ -157,28 +157,21 @@ def load_pretrain_weight(model, pretrain_weight):
...
@@ -157,28 +157,21 @@ def load_pretrain_weight(model, pretrain_weight):
weights_path
=
path
+
'.pdparams'
weights_path
=
path
+
'.pdparams'
param_state_dict
=
paddle
.
load
(
weights_path
)
param_state_dict
=
paddle
.
load
(
weights_path
)
lack_backbone_weights_cnt
=
0
ignore_weights
=
set
()
lack_modules
=
set
()
for
name
,
weight
in
model
_dict
.
items
():
for
name
,
weight
in
param_state
_dict
.
items
():
if
name
in
param_state
_dict
.
keys
():
if
name
in
model
_dict
.
keys
():
if
weight
.
shape
!=
list
(
param_state
_dict
[
name
].
shape
):
if
list
(
weight
.
shape
)
!=
list
(
model
_dict
[
name
].
shape
):
logger
.
info
(
logger
.
info
(
'{} not used, shape {} unmatched with {} in model.'
.
format
(
'{} not used, shape {} unmatched with {} in model.'
.
format
(
name
,
list
(
param_state_dict
[
name
].
shape
),
weight
.
shape
))
name
,
weight
.
shape
,
list
(
model_dict
[
name
].
shape
)
))
param_state_dict
.
pop
(
name
,
Non
e
)
ignore_weights
.
add
(
nam
e
)
else
:
else
:
lack_modules
.
add
(
name
.
split
(
'.'
)[
0
])
logger
.
info
(
'Redundant weight {} and ignore it.'
.
format
(
name
))
if
name
.
find
(
'backbone'
)
>=
0
:
ignore_weights
.
add
(
name
)
logger
.
info
(
'Lack backbone weights: {}'
.
format
(
name
))
lack_backbone_weights_cnt
+=
1
for
weight
in
ignore_weights
:
param_state_dict
.
pop
(
weight
,
None
)
if
lack_backbone_weights_cnt
>
0
:
logger
.
info
(
'Lack {} weights in backbone.'
.
format
(
lack_backbone_weights_cnt
))
if
len
(
lack_modules
)
>
0
:
logger
.
info
(
'Lack weights of modules: {}'
.
format
(
', '
.
join
(
list
(
lack_modules
))))
model
.
set_dict
(
param_state_dict
)
model
.
set_dict
(
param_state_dict
)
logger
.
info
(
'Finish loading model weights: {}'
.
format
(
weights_path
))
logger
.
info
(
'Finish loading model weights: {}'
.
format
(
weights_path
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录