@@ -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
4848videos_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
5453To load a ` .pose ` file, use the ` Pose ` class.
5554
@@ -94,6 +93,13 @@ pose.torch()
9493pose.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
99105Once 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())
194200display(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:
198212If you have pose data in OpenPose or MediaPipe Holistic format, you can easily import it.
199213
0 commit comments