Skip to content

Commit 4021ef1

Browse files
authored
add to docs (#176)
1 parent 2b5a0fb commit 4021ef1

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ video_to_pose --format mediapipe -i example.mp4 -o example.pose \
4646

4747
# Recursively search for videos within a directory, and process them 10 at a time
4848
videos_to_poses --format mediapipe -num-workers 10 --recursive --directory /path/to/videos
49-
5049
```
5150

52-
#### 3. Reading `.pose` Files:
51+
#### 3. Reading and Writing `.pose` Files:
5352

5453
To load a `.pose` file, use the `Pose` class.
5554

@@ -94,6 +93,13 @@ pose.torch()
9493
pose.tensorflow()
9594
```
9695

96+
Finally, to write a `Pose` object to a file:
97+
98+
```python
99+
with open(pose_filepath, "wb") as data_buffer:
100+
pose.write(data_buffer)
101+
```
102+
97103
#### 4. Data Manipulation:
98104

99105
Once poses are loaded, the library offers many ways to manipulate the created `Pose` objects.
@@ -194,6 +200,14 @@ v.save_gif("test.gif", v.draw())
194200
display(Image(open('test.gif','rb').read()))
195201
```
196202

203+
There is also a CLI command for visualizing poses:
204+
205+
```bash
206+
visualize_pose -i example.pose -o example.mp4 --normalize
207+
```
208+
209+
Normalizing the pose before creating the mp4 output file (`--normalize`) is optional.
210+
197211
#### 6. Integration with External Data Sources:
198212
If you have pose data in OpenPose or MediaPipe Holistic format, you can easily import it.
199213

0 commit comments

Comments
 (0)