Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
活在明天
openpose
提交
59ae459d
O
openpose
项目概览
活在明天
/
openpose
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openpose
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
59ae459d
编写于
9月 19, 2017
作者:
G
gineshidalgo99
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Slightly improved accuracy with ear-shoulder connection
上级
37b1dc55
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
28 deletion
+37
-28
doc/release_notes.md
doc/release_notes.md
+1
-0
examples/tests/pose_accuracy_coco_test.sh
examples/tests/pose_accuracy_coco_test.sh
+12
-4
src/openpose/pose/bodyPartConnectorBase.cpp
src/openpose/pose/bodyPartConnectorBase.cpp
+24
-24
未找到文件。
doc/release_notes.md
浏览文件 @
59ae459d
...
...
@@ -106,5 +106,6 @@ OpenPose Library - Release Notes
1.
Main improvements:
1.
Added how to use keypoint data in
`examples/tutorial_wrapper/`
.
2.
Added flag for warnings of type
`-Wsign-compare`
and removed in code.
3.
Slightly improved accuracy by considering ears-shoulder connection (e.g. 0.4 mAP for 1 scale in validation set).
2.
Main bugs fixed:
1.
Windows version crashing with std::map copy.
examples/tests/pose_accuracy_coco_test.sh
浏览文件 @
59ae459d
# Script for internal use. We might completely change it continuously and we will not answer questions about it.
clear
&&
clear
# USAGE EXAMPLE
# clear && clear && make all -j24 && bash ./examples/tests/pose_accuracy_coco_test.sh
# # Go back to main folder
# cd ../../
# Write COCO-format JSON
# Note: `--frame_last 3558` --> total = 3559 frames
# Last id:
# ID 20671 <--> #frames = 1471 --> ~ 1.5 min at 15fps
# ID 50006 <--> #frames = 3559 --> ~ 4 min at 15fps
# Parameters
IMAGE_FOLDER
=
/home/gines/devel/images/val2014/
$JSON_FOLDER
=
../evaluation/coco/results/openpose/
OP_BIN
=
./build/examples/openpose/openpose.bin
# 1 scale
./build/examples/openpose/openpose.bin
--image_dir
"/home/gines/devel/images/val2014"
--write_coco_json
../evaluation/coco/results/openpose/1
.json
--no_display
--render_pose
0
--frame_last
3558
$OP_BIN
--image_dir
$IMAGE_FOLDER
--write_coco_json
${
JSON_FOLDER
}
1_test
.json
--no_display
--render_pose
0
--frame_last
3558
# # 3 scales
#
./build/examples/openpose/openpose.bin --image_dir "/home/gines/devel/images/val2014" --write_coco_json ../evaluation/coco/results/openpose/
1_3.json --no_display --render_pose 0 --scale_number 3 --scale_gap 0.25 --frame_last 3558
#
$OP_BIN --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}
1_3.json --no_display --render_pose 0 --scale_number 3 --scale_gap 0.25 --frame_last 3558
# # 4 scales
#
./build/examples/openpose/openpose.bin --num_gpu 1 --image_dir "/home/gines/devel/images/val2014" --write_coco_json ../evaluation/coco/results/openpose/
1_4.json --no_display --render_pose 0 --num_gpu 1 --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" --frame_last 3558
#
$OP_BIN --num_gpu 1 --image_dir $IMAGE_FOLDER --write_coco_json ${JSON_FOLDER}
1_4.json --no_display --render_pose 0 --num_gpu 1 --scale_number 4 --scale_gap 0.25 --net_resolution "1312x736" --frame_last 3558
# Debugging - Rendered frames saved
#
./build/examples/openpose/openpose.bin --image_dir "/home/gines/devel/images/val2014" --write_images ../evaluation/coco/results/openpose/
frameOutput --no_display
#
$OP_BIN --image_dir $IMAGE_FOLDER --write_images ${JSON_FOLDER}
frameOutput --no_display
src/openpose/pose/bodyPartConnectorBase.cpp
浏览文件 @
59ae459d
...
...
@@ -19,8 +19,8 @@ namespace op
const
auto
numberBodyPartPairs
=
bodyPartPairs
.
size
()
/
2
;
std
::
vector
<
std
::
pair
<
std
::
vector
<
int
>
,
double
>>
subset
;
// Vector<int> = Each body part + body parts counter; double = subsetScore
const
auto
subsetCounterIndex
=
numberBodyParts
+
1
;
const
auto
subsetSize
=
numberBodyParts
+
2
;
const
auto
subsetCounterIndex
=
numberBodyParts
;
const
auto
subsetSize
=
numberBodyParts
+
1
;
const
auto
peaksOffset
=
3
*
(
maxPeaks
+
1
);
const
auto
heatMapOffset
=
heatMapSize
.
area
();
...
...
@@ -38,7 +38,7 @@ namespace op
if
(
nA
==
0
||
nB
==
0
)
{
// Change w.r.t. other
if
(
n
B
!=
0
)
if
(
n
A
==
0
)
// nB == 0 or not
{
if
(
poseModel
==
PoseModel
::
COCO_18
||
poseModel
==
PoseModel
::
BODY_18
||
poseModel
==
PoseModel
::
BODY_22
)
{
...
...
@@ -79,7 +79,7 @@ namespace op
else
error
(
"Unknown model, cast to int = "
+
std
::
to_string
((
int
)
poseModel
),
__LINE__
,
__FUNCTION__
,
__FILE__
);
}
else
if
(
nA
!
=
0
)
else
// if (nA != 0 && nB =
= 0)
{
if
(
poseModel
==
PoseModel
::
COCO_18
||
poseModel
==
PoseModel
::
BODY_18
||
poseModel
==
PoseModel
::
BODY_22
)
{
...
...
@@ -121,7 +121,7 @@ namespace op
error
(
"Unknown model, cast to int = "
+
std
::
to_string
((
int
)
poseModel
),
__LINE__
,
__FUNCTION__
,
__FILE__
);
}
}
else
else
// if (nA != 0 && nB != 0)
{
std
::
vector
<
std
::
tuple
<
double
,
int
,
int
>>
temp
;
const
auto
numInter
=
10
;
...
...
@@ -159,7 +159,7 @@ namespace op
}
}
// parts score + c
p
nnection score
// parts score + c
o
nnection score
if
(
count
>
interMinAboveThreshold
)
temp
.
emplace_back
(
std
::
make_tuple
(
sum
/
count
,
i
,
j
));
}
...
...
@@ -213,24 +213,24 @@ namespace op
subset
.
emplace_back
(
std
::
make_pair
(
rowVector
,
subsetScore
));
}
}
//
//
Add ears connections (in case person is looking to opposite direction to camera)
// else if (poseModel == PoseModel::COCO_18 && (pairIndex==16 || pairIndex==17
))
//
{
//
for (const auto& connectionKI : connectionK)
//
{
//
const auto indexA = std::get<0>(connectionKI);
//
const auto indexB = std::get<1>(connectionKI);
//
for (auto& subsetJ : subset)
//
{
// auto& subsetJFirst = subsetJ.first[bodyPartA];
// auto& subsetJFirstPlus1 = subsetJFirst[bodyPartB];
//
if (subsetJFirst == indexA && subsetJFirstPlus1 == 0)
//
subsetJFirstPlus1 = indexB;
//
else if (subsetJFirstPlus1 == indexB && subsetJFirst == 0)
//
subsetJFirst = indexA;
//
}
//
}
//
}
// Add ears connections (in case person is looking to opposite direction to camera)
else
if
(
poseModel
==
PoseModel
::
COCO_18
&&
(
pairIndex
==
17
||
pairIndex
==
18
))
{
for
(
const
auto
&
connectionKI
:
connectionK
)
{
const
auto
indexA
=
std
::
get
<
0
>
(
connectionKI
);
const
auto
indexB
=
std
::
get
<
1
>
(
connectionKI
);
for
(
auto
&
subsetJ
:
subset
)
{
auto
&
subsetJFirst
=
subsetJ
.
first
[
bodyPartA
];
auto
&
subsetJFirstPlus1
=
subsetJ
.
first
[
bodyPartB
];
if
(
subsetJFirst
==
indexA
&&
subsetJFirstPlus1
==
0
)
subsetJFirstPlus1
=
indexB
;
else
if
(
subsetJFirstPlus1
==
indexB
&&
subsetJFirst
==
0
)
subsetJFirst
=
indexA
;
}
}
}
else
{
if
(
!
connectionK
.
empty
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录