Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
912833f2
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看板
未验证
提交
912833f2
编写于
5月 12, 2021
作者:
Z
zhiboniu
提交者:
GitHub
5月 12, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change hrhrnet eval heat_thresh=0.1; fix crowdpose eval (#2945)
上级
1aa7e2e4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
5 deletion
+5
-5
ppdet/data/source/keypoint_coco.py
ppdet/data/source/keypoint_coco.py
+0
-1
ppdet/engine/trainer.py
ppdet/engine/trainer.py
+2
-0
ppdet/metrics/coco_utils.py
ppdet/metrics/coco_utils.py
+0
-1
ppdet/modeling/architectures/keypoint_hrhrnet.py
ppdet/modeling/architectures/keypoint_hrhrnet.py
+3
-3
未找到文件。
ppdet/data/source/keypoint_coco.py
浏览文件 @
912833f2
...
...
@@ -60,7 +60,6 @@ class KeypointBottomUpBaseDataset(DetDataset):
self
.
test_mode
=
test_mode
self
.
ann_info
[
'num_joints'
]
=
num_joints
self
.
img_ids
=
[]
def
__len__
(
self
):
...
...
ppdet/engine/trainer.py
浏览文件 @
912833f2
...
...
@@ -147,6 +147,7 @@ class Trainer(object):
eval_dataset
.
check_or_download_dataset
()
anno_file
=
eval_dataset
.
get_anno
()
IouType
=
self
.
cfg
[
'IouType'
]
if
'IouType'
in
self
.
cfg
else
'bbox'
self
.
_metrics
=
[
COCOMetric
(
anno_file
=
anno_file
,
...
...
@@ -154,6 +155,7 @@ class Trainer(object):
classwise
=
classwise
,
output_eval
=
output_eval
,
bias
=
bias
,
IouType
=
IouType
,
save_prediction_only
=
save_prediction_only
)
]
elif
self
.
cfg
.
metric
==
'VOC'
:
...
...
ppdet/metrics/coco_utils.py
浏览文件 @
912833f2
...
...
@@ -107,7 +107,6 @@ def cocoapi_eval(jsonfile,
coco_eval
.
params
.
maxDets
=
list
(
max_dets
)
elif
style
==
'keypoints_crowd'
:
coco_eval
=
COCOeval
(
coco_gt
,
coco_dt
,
style
,
sigmas
,
use_area
)
coco_gt
.
anno_file
.
append
(
""
)
else
:
coco_eval
=
COCOeval
(
coco_gt
,
coco_dt
,
style
)
coco_eval
.
evaluate
()
...
...
ppdet/modeling/architectures/keypoint_hrhrnet.py
浏览文件 @
912833f2
...
...
@@ -52,7 +52,7 @@ class HigherHRNet(BaseArch):
super
(
HigherHRNet
,
self
).
__init__
()
self
.
backbone
=
backbone
self
.
hrhrnet_head
=
hrhrnet_head
self
.
post_process
=
HrHRNetPostProcess
()
self
.
post_process
=
post_process
self
.
flip
=
eval_flip
self
.
flip_perm
=
paddle
.
to_tensor
(
flip_perm
)
self
.
deploy
=
False
...
...
@@ -85,6 +85,7 @@ class HigherHRNet(BaseArch):
return
self
.
hrhrnet_head
(
body_feats
,
self
.
inputs
)
else
:
outputs
=
self
.
hrhrnet_head
(
body_feats
)
if
self
.
flip
and
not
self
.
deploy
:
outputs
=
[
paddle
.
split
(
o
,
2
)
for
o
in
outputs
]
output_rflip
=
[
...
...
@@ -105,7 +106,6 @@ class HigherHRNet(BaseArch):
w
=
self
.
inputs
[
'im_shape'
][
0
,
1
].
numpy
().
item
()
kpts
,
scores
=
self
.
post_process
(
*
outputs
,
h
,
w
)
res_lst
.
append
([
kpts
,
scores
])
return
res_lst
def
get_loss
(
self
):
...
...
@@ -157,7 +157,7 @@ class HrHRNetPostProcess(object):
original_height, original_width (float): the original image size
'''
def
__init__
(
self
,
max_num_people
=
30
,
heat_thresh
=
0.
2
,
tag_thresh
=
1.
):
def
__init__
(
self
,
max_num_people
=
30
,
heat_thresh
=
0.
1
,
tag_thresh
=
1.
):
self
.
max_num_people
=
max_num_people
self
.
heat_thresh
=
heat_thresh
self
.
tag_thresh
=
tag_thresh
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录