Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sq975
openpose
提交
20d85fce
O
openpose
项目概览
sq975
/
openpose
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
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 搜索 >>
提交
20d85fce
编写于
7月 05, 2017
作者:
G
gineshidalgo99
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated handExtractor
上级
1a75a086
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
3 addition
and
45 deletion
+3
-45
src/openpose/hand/handExtractor.cpp
src/openpose/hand/handExtractor.cpp
+3
-45
未找到文件。
src/openpose/hand/handExtractor.cpp
浏览文件 @
20d85fce
...
...
@@ -19,7 +19,7 @@ namespace op
spNet
{
std
::
make_shared
<
NetCaffe
>
(
std
::
array
<
int
,
4
>
{
1
,
3
,
mNetOutputSize
.
y
,
mNetOutputSize
.
x
},
modelFolder
+
HAND_PROTOTXT
,
modelFolder
+
HAND_TRAINED_MODEL
,
gpuId
)},
spResizeAndMergeCaffe
{
std
::
make_shared
<
ResizeAndMergeCaffe
<
float
>>
()},
sp
NmsCaffe
{
std
::
make_shared
<
Nms
Caffe
<
float
>>
()},
sp
MaximumCaffe
{
std
::
make_shared
<
Maximum
Caffe
<
float
>>
()},
mHandImageCrop
{
mNetOutputSize
.
area
()
*
3
}
{
try
...
...
@@ -28,10 +28,6 @@ error("Hands extraction is not implemented yet. COMING SOON!", __LINE__, __FUNCT
checkE
(
netOutputSize
.
x
,
netInputSize
.
x
,
"Net input and output size must be equal."
,
__LINE__
,
__FUNCTION__
,
__FILE__
);
checkE
(
netOutputSize
.
y
,
netInputSize
.
y
,
"Net input and output size must be equal."
,
__LINE__
,
__FUNCTION__
,
__FILE__
);
checkE
(
netInputSize
.
x
,
netInputSize
.
y
,
"Net input size must be squared."
,
__LINE__
,
__FUNCTION__
,
__FILE__
);
// Properties
for
(
auto
&
property
:
mProperties
)
property
=
0.
;
mProperties
[(
int
)
HandProperty
::
NMSThreshold
]
=
HAND_DEFAULT_NMS_THRESHOLD
;
}
catch
(
const
std
::
exception
&
e
)
{
...
...
@@ -61,7 +57,7 @@ error("Hands extraction is not implemented yet. COMING SOON!", __LINE__, __FUNCT
// Pose extractor blob and layer
spPeaksBlob
=
{
std
::
make_shared
<
caffe
::
Blob
<
float
>>
(
1
,
1
,
1
,
1
)};
sp
NmsCaffe
->
Reshape
({
spHeatMapsBlob
.
get
()},
{
spPeaksBlob
.
get
()},
HAND_MAX_PEAKS
,
HAND_NUMBER_PARTS
+
1
);
sp
MaximumCaffe
->
Reshape
({
spHeatMapsBlob
.
get
()},
{
spPeaksBlob
.
get
()}
);
cudaCheck
(
__LINE__
,
__FUNCTION__
,
__FILE__
);
log
(
"Finished initialization on thread."
,
Priority
::
Low
,
__LINE__
,
__FUNCTION__
,
__FILE__
);
...
...
@@ -102,43 +98,6 @@ error("Hands extraction is not implemented yet. COMING SOON!", __LINE__, __FUNCT
}
}
double
HandExtractor
::
get
(
const
HandProperty
property
)
const
{
try
{
return
mProperties
.
at
((
int
)
property
);
}
catch
(
const
std
::
exception
&
e
)
{
error
(
e
.
what
(),
__LINE__
,
__FUNCTION__
,
__FILE__
);
return
0.
;
}
}
void
HandExtractor
::
set
(
const
HandProperty
property
,
const
double
value
)
{
try
{
mProperties
.
at
((
int
)
property
)
=
{
value
};
}
catch
(
const
std
::
exception
&
e
)
{
error
(
e
.
what
(),
__LINE__
,
__FUNCTION__
,
__FILE__
);
}
}
void
HandExtractor
::
increase
(
const
HandProperty
property
,
const
double
value
)
{
try
{
mProperties
[(
int
)
property
]
=
mProperties
.
at
((
int
)
property
)
+
value
;
}
catch
(
const
std
::
exception
&
e
)
{
error
(
e
.
what
(),
__LINE__
,
__FUNCTION__
,
__FILE__
);
}
}
void
HandExtractor
::
checkThread
()
const
{
try
...
...
@@ -153,7 +112,7 @@ error("Hands extraction is not implemented yet. COMING SOON!", __LINE__, __FUNCT
}
void
HandExtractor
::
detectHandKeypoints
(
Array
<
float
>&
handCurrent
,
const
float
scaleInputToOutput
,
const
int
person
,
const
cv
::
Mat
&
affineMatrix
,
const
unsigned
int
handPeaksOffset
)
const
cv
::
Mat
&
affineMatrix
)
{
try
{
...
...
@@ -162,7 +121,6 @@ error("Hands extraction is not implemented yet. COMING SOON!", __LINE__, __FUNCT
UNUSED
(
scaleInputToOutput
);
UNUSED
(
person
);
UNUSED
(
affineMatrix
);
UNUSED
(
handPeaksOffset
);
}
catch
(
const
std
::
exception
&
e
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录