Modify from official openpose demo 01_body_from_image.py. https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/examples/tutorial_api_python/01_body_from_image.py
You can run this py script for video.
Before you use it, you should have installed openpose on your PC, and put it inside this directory: yourpath/openpose-1.7.0/build/examples/tutorial_api_python/
https://blog.csdn.net/weixin_39518984/article/details/117879062?spm=1001.2014.3001.5501