Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
102ef39a
Unverified
Commit
102ef39a
authored
Feb 21, 2020
by
Alexander Alekhin
Committed by
GitHub
Feb 21, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16225 from berak:dnn_pose_estimation
dnn: small fix in pose estimation model
parents
96b26dc8
4fdf4d38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
model.cpp
modules/dnn/src/model.cpp
+1
-1
test_model.cpp
modules/dnn/test/test_model.cpp
+9
-3
No files found.
modules/dnn/src/model.cpp
View file @
102ef39a
...
...
@@ -177,8 +177,8 @@ std::vector<Point2f> KeypointsModel::estimate(InputArray frame, float thresh)
p
=
maxLoc
;
p
.
x
*=
(
float
)
frameWidth
/
width
;
p
.
y
*=
(
float
)
frameHeight
/
height
;
points
.
push_back
(
p
);
}
points
.
push_back
(
p
);
}
}
// Otherwise the output is a vector of keypoints and we can just return it
...
...
modules/dnn/test/test_model.cpp
View file @
102ef39a
...
...
@@ -273,9 +273,15 @@ TEST_P(Test_Model, Keypoints_pose)
#endif
Mat
inp
=
imread
(
_tf
(
"pose.png"
));
std
::
string
weights
=
_tf
(
"onnx/models/lightweight_pose_estimation.onnx"
,
false
);
Mat
exp
=
blobFromNPY
(
_tf
(
"keypoints_exp.npy"
));
std
::
string
weights
=
_tf
(
"onnx/models/lightweight_pose_estimation_201912.onnx"
,
false
);
float
kpdata
[]
=
{
237.65625
f
,
78.25
f
,
237.65625
f
,
136.9375
f
,
190.125
f
,
136.9375
f
,
142.59375
f
,
195.625
f
,
79.21875
f
,
176.0625
f
,
285.1875
f
,
117.375
f
,
348.5625
f
,
195.625
f
,
396.09375
f
,
176.0625
f
,
205.96875
f
,
313.0
f
,
205.96875
f
,
430.375
f
,
205.96875
f
,
528.1875
f
,
269.34375
f
,
293.4375
f
,
253.5
f
,
430.375
f
,
237.65625
f
,
528.1875
f
,
221.8125
f
,
58.6875
f
,
253.5
f
,
58.6875
f
,
205.96875
f
,
78.25
f
,
253.5
f
,
58.6875
f
};
Mat
exp
(
18
,
2
,
CV_32FC1
,
kpdata
);
Size
size
{
256
,
256
};
float
norm
=
1e-4
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment