Skip to content

Commit 3a7c401

Browse files
Added output generation examples
1 parent 46da51b commit 3a7c401

File tree

1 file changed

+86
-62
lines changed

1 file changed

+86
-62
lines changed

doc/demo_overview.md

Lines changed: 86 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,91 @@ In order to learn how to use it, run `./build/examples/openpose/openpose.bin --h
77

88

99

10-
## Most Important Configuration Flags
10+
## Running on Images, Video or Webcam
11+
See [doc/installation.md#quick-start](./installation.md#quick-start).
12+
13+
14+
15+
## Pose + Face + Hands
16+
See [doc/installation.md#quick-start](./installation.md#quick-start).
17+
18+
19+
20+
## Maximum Accuracy Configuration
21+
See [doc/installation.md#quick-start](./installation.md#quick-start).
22+
23+
24+
25+
## Basic Output Saving
26+
The following example runs the demo video `video.avi`, renders image frames on `output/result.avi`, and outputs JSON files in `output/`:
27+
```
28+
./build/examples/openpose/openpose.bin --video examples/media/video.avi --write_video output/result.avi --write_keypoint_json output/
29+
```
30+
31+
32+
33+
## Basic Output Saving with No Visualization
34+
The following example runs the demo video `video.avi` and outputs JSON files in `output/`:
35+
```
36+
# Only body
37+
./build/examples/openpose/openpose.bin --video examples/media/video.avi --write_keypoint_json output/ --no_display --render_pose 0
38+
# Body + face + hands
39+
./build/examples/openpose/openpose.bin --video examples/media/video.avi --write_keypoint_json output/ --no_display --render_pose 0 --face --hand
40+
```
41+
42+
43+
44+
## Hands
45+
```
46+
# Fast method for speed
47+
./build/examples/openpose/openpose.bin --hand
48+
# Best results found with 6 scales
49+
./build/examples/openpose/openpose.bin --hand --hand_scale_number 6 --hand_scale_range 0.4
50+
# Adding tracking to Webcam (if FPS per GPU > 10 FPS) and Video
51+
./build/examples/openpose/openpose.bin --video examples/media/video.avi --hand --hand_tracking
52+
# Multi-scale + tracking is also possible
53+
./build/examples/openpose/openpose.bin --video examples/media/video.avi --hand --hand_scale_number 6 --hand_scale_range 0.4 --hand_tracking
54+
```
55+
56+
57+
58+
## Rendering Face and Hands without Pose
59+
```
60+
# CPU rendering (faster)
61+
./build/examples/openpose/openpose.bin --render_pose 0 --face --face_render 1 --hand --hand_render 1
62+
# GPU rendering
63+
./build/examples/openpose/openpose.bin --render_pose 0 --face --face_render 2 --hand --hand_render 2
64+
```
65+
66+
67+
68+
## Debugging Information
69+
```
70+
# Basic information
71+
./build/examples/openpose/openpose.bin --logging_level 3
72+
# Showing all messages
73+
./build/examples/openpose/openpose.bin --logging_level 0
74+
```
75+
76+
77+
78+
## Selecting Some GPUs
79+
The following example runs the demo video `video.avi`, parallelizes it over 2 GPUs, GPUs 1 and 2 (note that it will skip GPU 0):
80+
```
81+
./build/examples/openpose/openpose.bin --video examples/media/video.avi --num_gpu 2 --num_gpu_start 1
82+
```
83+
84+
85+
86+
## Heat Maps Storing
87+
The following command will save all the body part heat maps, background heat map and Part Affinity Fields (PAFs) in the folder `output_heatmaps_folder`. It will save them on PNG format. Instead of individually saving each of the 67 heatmaps (18 body parts + background + 2 x 19 PAFs) individually, the library concatenate them vertically into a huge (width x #heatmaps) x (height) matrix. The PAFs channels are multiplied by 2 because there is one heatmpa for the x-coordinates and one for the y-coordinates. The order is body parts + bkg + PAFs. It will follow the sequence on POSE_BODY_PART_MAPPING in [include/openpose/pose/poseParameters.hpp](../include/openpose/pose/poseParameters.hpp).
88+
```
89+
./build/examples/openpose/openpose.bin --video examples/media/video.avi --heatmaps_add_parts --heatmaps_add_bkg --heatmaps_add_PAFs --write_heatmaps output_heatmaps_folder/
90+
```
91+
92+
93+
94+
## Main Flags
1195
We enumerate some of the most important flags, check the `Flags Detailed Description` section or run `./build/examples/openpose/openpose.bin --help` for a full description of all of them.
1296

1397
- `--face`: Enables face keypoint detection.
@@ -30,7 +114,7 @@ We enumerate some of the most important flags, check the `Flags Detailed Descrip
30114

31115

32116

33-
## Flags Detailed Description
117+
## Flags Description
34118
Each flag is divided into flag name, default value, and description.
35119

36120
1. Debugging
@@ -112,63 +196,3 @@ Each flag is divided into flag name, default value, and description.
112196
- DEFINE_string(write_coco_json, "", "Full file path to write people pose data with *.json COCO validation format.");
113197
- DEFINE_string(write_heatmaps, "", "Directory to write heatmaps in *.png format. At least 1 `add_heatmaps_X` flag must be enabled.");
114198
- DEFINE_string(write_heatmaps_format, "png", "File extension and format for `write_heatmaps`, analogous to `write_images_format`. Recommended `png` or any compressed and lossless format.");
115-
116-
117-
118-
## Heat Maps Storing
119-
The following command will save all the body part heat maps, background heat map and Part Affinity Fields (PAFs) in the folder `output_heatmaps_folder`. It will save them on PNG format. Instead of individually saving each of the 67 heatmaps (18 body parts + background + 2 x 19 PAFs) individually, the library concatenate them vertically into a huge (width x #heatmaps) x (height) matrix. The PAFs channels are multiplied by 2 because there is one heatmpa for the x-coordinates and one for the y-coordinates. The order is body parts + bkg + PAFs. It will follow the sequence on POSE_BODY_PART_MAPPING in [include/openpose/pose/poseParameters.hpp](../include/openpose/pose/poseParameters.hpp).
120-
```
121-
./build/examples/openpose/openpose.bin --video examples/media/video.avi --heatmaps_add_parts --heatmaps_add_bkg --heatmaps_add_PAFs --write_heatmaps output_heatmaps_folder/
122-
```
123-
124-
125-
126-
## Maximum Accuracy Configuration
127-
See [doc/installation.md#quick-start](./installation.md#quick-start).
128-
129-
130-
131-
## Basic Output Saving
132-
The following example runs the demo video `video.avi`, renders image frames on `output/result.avi`, and outputs JSON files in `output/`. It parallelizes over 2 GPUs, GPUs 1 and 2 (note that it will skip GPU 0):
133-
```
134-
./build/examples/openpose/openpose.bin --video examples/media/video.avi --num_gpu 2 --num_gpu_start 1 --write_video output/result.avi --write_keypoint_json output/
135-
```
136-
137-
138-
139-
## Hands
140-
```
141-
# Fast method for speed
142-
./build/examples/openpose/openpose.bin --hand
143-
# Best results found with 6 scales
144-
./build/examples/openpose/openpose.bin --hand --hand_scale_number 6 --hand_scale_range 0.4
145-
# Adding tracking to Webcam (if FPS per GPU > 10 FPS) and Video
146-
./build/examples/openpose/openpose.bin --video examples/media/video.avi --hand --hand_tracking
147-
# Multi-scale + tracking is also possible
148-
./build/examples/openpose/openpose.bin --video examples/media/video.avi --hand --hand_scale_number 6 --hand_scale_range 0.4 --hand_tracking
149-
```
150-
151-
152-
153-
## Pose + Face + Hands
154-
See [doc/installation.md#quick-start](./installation.md#quick-start).
155-
156-
157-
158-
## Rendering Face without Pose
159-
```
160-
# CPU rendering (faster)
161-
./build/examples/openpose/openpose.bin --face --render_pose 0 --face_render 1
162-
# GPU rendering
163-
./build/examples/openpose/openpose.bin --face --render_pose 0 --face_render 2
164-
```
165-
166-
167-
168-
## Debugging Information
169-
```
170-
# Basic information
171-
./build/examples/openpose/openpose.bin --logging_level 3
172-
# Showing all messages
173-
./build/examples/openpose/openpose.bin --logging_level 0
174-
```

0 commit comments

Comments
 (0)