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_NAME
to install
- Openpose models
- Clone OpenPose
- Run
./models/getModels.bat
to download models
This code is based on OpenPose python tutorial 01
# From Python
# It requires OpenCV installed for Python
import sys
import cv2
import pyopenpose as op
# Custom Params (refer to include/openpose/flags.hpp for more parameters)
params = dict()
params["model_folder"] = "YOUR_MODELS_PATH"
try:
# Starting OpenPose
opWrapper = op.WrapperPython()
opWrapper.configure(params)
opWrapper.start()
datum = op.Datum()
imageToProcess = cv2.imread('YOUR_IMAGE_PATH')
datum.cvInputData = imageToProcess
opWrapper.emplaceAndPop([datum])
print("Body keypoints: \n" + str(datum.poseKeypoints))
cv2.imshow("OpenPose 1.5.1 - Tutorial Python API", datum.cvOutputData)
cv2.waitKey(0)
except Exception as e:
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