Hzzone / pytorch-openpose

pytorch implementation of openpose including Hand and Body Pose Estimation.
2.02k stars 391 forks source link

Add script to process video files #49

Closed gngdb closed 3 years ago

gngdb commented 3 years ago

I wrote a script to process video files and add the pose annotations. It processes frame by frame and it's not very fast but it works. Also, I had to add a line for numerical stability in src/body.py because I hit zero division errors.

Hzzone commented 3 years ago

Glad to be received your contribution. Could you provide others a README document about how to run the demo and the gif of the processed video? I think it would make the code better to follow.

gngdb commented 3 years ago

I've added some info on how to run it and the ffmpeg-python dependency to the README. I chose the first two CC licensed videos I could find with people in them, but the model performs quite badly with all the sprinters crouching for some reason. Also, I discovered a few mistakes in how the video files were being written that would cause errors for video files other than the one I originally used to test it. I think it should work with any video that cv2 can open now but I haven't tested it with every possible video filetype.

Hzzone commented 3 years ago

Thanks a lot.