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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
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
-
`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
)
...
...
ppdet/data/source/dataset.py
浏览文件 @
edd24ca1
...
...
@@ -82,7 +82,6 @@ class DetDataset(Dataset):
r
[
'curr_iter'
]
=
self
.
_curr_iter
else
:
roidb
[
'curr_iter'
]
=
self
.
_curr_iter
roidb
[
'curr_iter'
]
=
self
.
_curr_iter
self
.
_curr_iter
+=
1
return
self
.
transform
(
roidb
)
...
...
ppdet/utils/checkpoint.py
浏览文件 @
edd24ca1
...
...
@@ -157,28 +157,21 @@ def load_pretrain_weight(model, pretrain_weight):
weights_path
=
path
+
'.pdparams'
param_state_dict
=
paddle
.
load
(
weights_path
)
lack_backbone_weights_cnt
=
0
lack_modules
=
set
()
for
name
,
weight
in
model
_dict
.
items
():
if
name
in
param_state
_dict
.
keys
():
if
weight
.
shape
!=
list
(
param_state
_dict
[
name
].
shape
):
ignore_weights
=
set
()
for
name
,
weight
in
param_state
_dict
.
items
():
if
name
in
model
_dict
.
keys
():
if
list
(
weight
.
shape
)
!=
list
(
model
_dict
[
name
].
shape
):
logger
.
info
(
'{} not used, shape {} unmatched with {} in model.'
.
format
(
name
,
list
(
param_state_dict
[
name
].
shape
),
weight
.
shape
))
param_state_dict
.
pop
(
name
,
Non
e
)
name
,
weight
.
shape
,
list
(
model_dict
[
name
].
shape
)
))
ignore_weights
.
add
(
nam
e
)
else
:
lack_modules
.
add
(
name
.
split
(
'.'
)[
0
])
if
name
.
find
(
'backbone'
)
>=
0
:
logger
.
info
(
'Lack backbone weights: {}'
.
format
(
name
))
lack_backbone_weights_cnt
+=
1
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
))))
logger
.
info
(
'Redundant weight {} and ignore it.'
.
format
(
name
))
ignore_weights
.
add
(
name
)
for
weight
in
ignore_weights
:
param_state_dict
.
pop
(
weight
,
None
)
model
.
set_dict
(
param_state_dict
)
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录