Daniil-Osokin / lightweight-human-pose-estimation-3d-demo.pytorch

Real-time 3D multi-person pose estimation demo in PyTorch. OpenVINO backend can be used for fast inference on CPU.
Apache License 2.0
656 stars 138 forks source link

Write output video #10

Closed floriandotpy closed 4 years ago

floriandotpy commented 4 years ago

This PR adds an additional CLI parameter --outfile. You can pass in a video file path to store a video that contains the 2d pose overlayed on the input video. The video will also include a side-by-side view of the 3d pose.

Example usage:

python demo.py --video=in.mov --outfile=out.mov -m=human-pose-estimation-3d.pth

Note: When setting --video=0 it also works for a webcam stream, put since the video writer is assuming fixed 30fps for now, the output video might look sped up compared to real-time.

This is what the output video will look like:

image

Curious to hear feedback and if you want to merge this.

Daniil-Osokin commented 4 years ago

Hi, thanks for the contribution! I've checked, and it works :tada: The code is mostly ok, i've left some comments.

Daniil-Osokin commented 4 years ago

Fell free to reopen when you will be ready.

ryo-matsuzaka commented 3 years ago

@Daniil-Osokin This implementation is already merged? If not, I also need this feature, so I want to take over.

Daniil-Osokin commented 3 years ago

@ryo-matsuzaka You can just use this branch.

ryo-matsuzaka commented 3 years ago

Thank you very much for quick reply. Ok, I use this branch.