You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 2 alternatives to save the **(x,y,score) body part locations**. The `write_keypoint` flag uses the OpenCV cv::FileStorage default formats (JSON, XML and YML). However, the JSON format is only available after OpenCV 3.0. Hence, `write_keypoint_json` saves the people pose data using a custom JSON writer. For the latter, each JSON file has a `people` array of objects, where each object has an array `body_parts` containing the body part locations and detection confidence formatted as `x1,y1,c1,x2,y2,c2,...`. The coordinates `x` and `y` can be normalized to the range [0,1], [-1,1], [0, source size], [0, output size], etc., depending on the flag `keypoint_scale`. In addition, `c` is the confidence in the range [0,1].
144
-
145
-
```
146
-
{
147
-
"version":0.1,
148
-
"people":[
149
-
{"body_parts":[1114.15,160.396,0.846207,...]},
150
-
{"body_parts":[...]},
151
-
]
152
-
}
153
-
```
154
-
155
-
The body part order of the COCO (18 body parts) and MPI (15 body parts) keypoints is described in `POSE_BODY_PART_MAPPING` in [include/openpose/pose/poseParameters.hpp](include/openpose/pose/poseParameters.hpp). E.g., for COCO:
156
-
```
157
-
POSE_COCO_BODY_PARTS {
158
-
{0, "Nose"},
159
-
{1, "Neck"},
160
-
{2, "RShoulder"},
161
-
{3, "RElbow"},
162
-
{4, "RWrist"},
163
-
{5, "LShoulder"},
164
-
{6, "LElbow"},
165
-
{7, "LWrist"},
166
-
{8, "RHip"},
167
-
{9, "RKnee"},
168
-
{10, "RAnkle"},
169
-
{11, "LHip"},
170
-
{12, "LKnee"},
171
-
{13, "LAnkle"},
172
-
{14, "REye"},
173
-
{15, "LEye"},
174
-
{16, "REar"},
175
-
{17, "LEar"},
176
-
{18, "Bkg"},
177
-
}
178
-
```
179
-
180
-
For the **heat maps storing format**, instead of individually saving each of the 67 heatmaps (18 body parts + background + 2 x 19 PAFs) individually, the library concatenates them into a huge (width x #heat maps) x (height) matrix, i.e. it concats the heat maps by columns. E.g., columns [0, individual heat map width] contains the first heat map, columns [individual heat map width + 1, 2 * individual heat map width] contains the second heat map, etc. Note that some image viewers are not able to display the resulting images due to the size. However, Chrome and Firefox are able to properly open them.
181
-
182
-
The saving order is body parts + background + PAFs. Any of them can be disabled with program flags. If background is disabled, then the final image will be body parts + PAFs. The body parts and background follow the order of `POSE_COCO_BODY_PARTS` or `POSE_MPI_BODY_PARTS`, while the PAFs follow the order specified on POSE_BODY_PART_PAIRS in `poseParameters.hpp`. E.g., for COCO:
Where each index is the key value corresponding to each body part in `POSE_COCO_BODY_PARTS`, e.g., 0 for "Neck", 1 for "RShoulder", etc.
188
-
189
-
#### Reading Saved Results
190
-
We use standard formats (JSON, XML, PNG, JPG, ...) to save our results, so there will be lots of frameworks to read them later, but you might also directly use our functions in [include/openpose/filestream.hpp](include/openpose/filestream.hpp). In particular, `loadData` (for JSON, XML and YML files) and `loadImage` (for image formats such as PNG or JPG) to load the data into cv::Mat format.
Check the output (format, keypoint index ordering, etc.) in [doc/output.md](doc/output.md).
201
143
202
144
203
145
204
-
## OpenPose Benchmark
205
-
Initial library running time benchmark on [OpenPose Benchmark](https://docs.google.com/spreadsheets/d/1-DynFGvoScvfWDA1P4jDInCkbD4lg0IKOYbXgEq0sK0/edit#gid=0). You can comment in that document with your graphics card model and running time for that model, and we will add your results to the benchmark!
146
+
## Speed Up OpenPose and Benchmark
147
+
Check the OpenPose Benchmarkand some hints to speed up OpenPose on [doc/installation.md#faq](doc/installation.md#faq).
Copy file name to clipboardExpand all lines: doc/installation.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -221,9 +221,9 @@ If you choose to visualize a body part or a PAF (Part Affinity Field) heat map w
221
221
222
222
**Q: Low speed** - OpenPose is quite slow, is it normal? How can I speed it up?
223
223
224
-
**A**: Check the Benchmark to discover the approximate speed of your graphics card: [https://github.com/CMU-Perceptual-Computing-Lab/openpose#openpose-benchmark](https://github.com/CMU-Perceptual-Computing-Lab/openpose#openpose-benchmark). Some speed tips:
224
+
**A**: Check the [OpenPose Benchmark](https://docs.google.com/spreadsheets/d/1-DynFGvoScvfWDA1P4jDInCkbD4lg0IKOYbXgEq0sK0/edit#gid=0) to discover the approximate speed of your graphics card. Some speed tips:
225
225
226
226
1. Use cuDNN 5.1 (cuDNN 6 is ~10% slower).
227
-
2. If you have more than 1 GPU, set `--num_gpu`.
228
-
3. Reduce the `--net_resolution` (e.g. to 320x176) (lower accuracy).
227
+
2. Reduce the `--net_resolution` (e.g. to 320x176) (lower accuracy).
228
+
3. For face, reduce the `--face_net_resolution`. The resolution 320x320 usually works pretty decently.
229
229
4. Use the `MPI_4_layers` model (lower accuracy and lower number of parts).
There are 2 alternatives to save the **(x,y,score) body part locations**. The `write_keypoint` flag uses the OpenCV cv::FileStorage default formats (JSON, XML and YML). However, the JSON format is only available after OpenCV 3.0. Hence, `write_keypoint_json` saves the people pose data using a custom JSON writer. For the latter, each JSON file has a `people` array of objects, where each object has an array `body_parts` containing the body part locations and detection confidence formatted as `x1,y1,c1,x2,y2,c2,...`. The coordinates `x` and `y` can be normalized to the range [0,1], [-1,1], [0, source size], [0, output size], etc., depending on the flag `keypoint_scale`. In addition, `c` is the confidence in the range [0,1].
8
+
9
+
```
10
+
{
11
+
"version":0.1,
12
+
"people":[
13
+
{"body_parts":[1114.15,160.396,0.846207,...]},
14
+
{"body_parts":[...]},
15
+
]
16
+
}
17
+
```
18
+
19
+
The body part order of the COCO (18 body parts) and MPI (15 body parts) keypoints is described in `POSE_BODY_PART_MAPPING` in [include/openpose/pose/poseParameters.hpp](../include/openpose/pose/poseParameters.hpp). E.g., for COCO:
20
+
```
21
+
POSE_COCO_BODY_PARTS {
22
+
{0, "Nose"},
23
+
{1, "Neck"},
24
+
{2, "RShoulder"},
25
+
{3, "RElbow"},
26
+
{4, "RWrist"},
27
+
{5, "LShoulder"},
28
+
{6, "LElbow"},
29
+
{7, "LWrist"},
30
+
{8, "RHip"},
31
+
{9, "RKnee"},
32
+
{10, "RAnkle"},
33
+
{11, "LHip"},
34
+
{12, "LKnee"},
35
+
{13, "LAnkle"},
36
+
{14, "REye"},
37
+
{15, "LEye"},
38
+
{16, "REar"},
39
+
{17, "LEar"},
40
+
{18, "Bkg"},
41
+
}
42
+
```
43
+
44
+
For the **heat maps storing format**, instead of individually saving each of the 67 heatmaps (18 body parts + background + 2 x 19 PAFs) individually, the library concatenates them into a huge (width x #heat maps) x (height) matrix, i.e. it concats the heat maps by columns. E.g., columns [0, individual heat map width] contains the first heat map, columns [individual heat map width + 1, 2 * individual heat map width] contains the second heat map, etc. Note that some image viewers are not able to display the resulting images due to the size. However, Chrome and Firefox are able to properly open them.
45
+
46
+
The saving order is body parts + background + PAFs. Any of them can be disabled with program flags. If background is disabled, then the final image will be body parts + PAFs. The body parts and background follow the order of `POSE_COCO_BODY_PARTS` or `POSE_MPI_BODY_PARTS`, while the PAFs follow the order specified on POSE_BODY_PART_PAIRS in `poseParameters.hpp`. E.g., for COCO:
Where each index is the key value corresponding to each body part in `POSE_COCO_BODY_PARTS`, e.g., 0 for "Neck", 1 for "RShoulder", etc.
52
+
53
+
54
+
55
+
## Reading Saved Results
56
+
We use standard formats (JSON, XML, PNG, JPG, ...) to save our results, so there will be lots of frameworks to read them later, but you might also directly use our functions in [include/openpose/filestream.hpp](../include/openpose/filestream.hpp). In particular, `loadData` (for JSON, XML and YML files) and `loadImage` (for image formats such as PNG or JPG) to load the data into cv::Mat format.
0 commit comments