Unofficial pre-built OpenPose packages with cuda for Python.
This package only test on windows 10 with python 3.6
Prerequisites:
- Python 3.5+
- Numpy
- OpenCV
- Windows x64
- Nvidia GPU
Installaion:
- Python library
- Download whl file from release page
- Run
pip install WHL_FILE_NAMEto install
- Openpose models
- Clone OpenPose
- Run
./models/getModels.batto download models
This code is based on OpenPose python tutorial 01
# From Python# It requires OpenCV installed for Pythonimportsysimportcv2importpyopenposeasop# Custom Params (refer to include/openpose/flags.hpp for more parameters)params=dict()
params["model_folder"] ="YOUR_MODELS_PATH"try:
# Starting OpenPoseopWrapper=op.WrapperPython()
opWrapper.configure(params)
opWrapper.start()
datum=op.Datum()
imageToProcess=cv2.imread('YOUR_IMAGE_PATH')
datum.cvInputData=imageToProcessopWrapper.emplaceAndPop([datum])
print("Body keypoints: \n"+str(datum.poseKeypoints))
cv2.imshow("OpenPose 1.5.1 - Tutorial Python API", datum.cvOutputData)
cv2.waitKey(0)
exceptExceptionase:
print(e)
sys.exit(-1)More detailed information can be find in OpenPose Official Repository
- Support other OS (linux, mac)
- Support OpenCL and CPU version
- Create lite version(without dll) and upload to pypi