Skip to content

Python components (preprocessor and postprocessor) of the OpenPose

License

Notifications You must be signed in to change notification settings

ruiminshen/pyopenpose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python components of the OpenPose

This project provides Python modules for the OpenPose in PyTorch project. Two types of components are implemented in C++ to accelerate the running efficiency and engineering deployment:

  • Preprocessor: Converting the original keypoint coordinate label into two types (the Gaussian heatmap for keypoints and the heatmap for part affinity fields) of feature labels.
  • Postprocessor: Analyzing the feature maps obtained by the deep neural network (DNN) to get the keypoint coordinates of multiple objects (usually person).

If you are benefited from this project, a donation will be appreciated (via PayPal, 微信支付 or 支付宝).

Dependent tools and libraries

  • Linux is recommended, and Windows is not tested.
  • Compiler supports C++11 or later (such as GCC 4.8 or later).
  • Python development library, version 3 is recommended.
  • CMake.
  • pybind11.
  • Boost.
  • Eigen3.
  • OpenCV3.
  • cnpy (optional).

Install

  • Install the depend tools and libraries.
  • Download and extract the source code (e.g., ~/code/pyopenpose).
  • Create the build directory (e.g., ~/code/pyopenpose-build) and generate CMake cache (mkdir ~/code/pyopenpose-build && cd ~/code/pyopenpose-build && cmake ~/code/pyopenpose)
  • Check if the following variables in ~/code/pyopenpose-build/CMakeCache.txt are correct:
    • PYMODULE_ROOT: should be the user location for Python modules (e.g., ~/.local/lib/python3.5/site-packages)
    • PYTHON_EXECUTABLE and PYTHON_LIBRARY: should be the interpreter and library of the same version of Python. Version 3 is recommended (e.g., /usr/bin/python3 and /usr/lib/x86_64-linux-gnu/libpython3.5m.so).
    • C++11 is enabled (the CMAKE_CXX_FLAGS is set to -std=c++11 -fPIC by default).
    • DEBUG_SHOW can be used to debug the program in test projects (in the test folder of the source directory).
  • Compile the source code (cd ~/code/pyopenpose-build && make).

If everything goes well, a dynamic library (e.g., ~/.local/lib/python3.5/site-packages/pyopenpose.cpython-35m-x86_64-linux-gnu.so) which contains the Python modules will be appeared and can be used in Python codes.

Releases

No releases published

Packages

No packages published