forth-modelbasedtracker / pyopenpose Goto Github PK
View Code? Open in Web Editor NEWPython bindings for the Openpose library
License: BSD 3-Clause "New" or "Revised" License
Python bindings for the Openpose library
License: BSD 3-Clause "New" or "Revised" License
CMU-Perceptual-Computing-Lab/openpose@3e957ba
Scanning dependencies of target PyOpenPose
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o
[ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
/opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function 'void OpenPoseWrapper::detectPose(const cv::Mat&)':
/opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp:136:76: error: conversion from 'std::vector<op::Array<float> >' to non-scalar type 'op::Array<float>' requested
op::Array<float> netInputArray = membersPtr->cvMatToOpInput.createArray(rgb, scaleInputToNetInputs, netInputSizes);
^
/opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp:139:95: error: no matching function for call to 'op::PoseExtractorCaffe::forwardPass(op::Array<float>&, const op::Point<int>&, std::vector<double>&)'
membersPtr->poseExtractorCaffe.forwardPass(netInputArray, imageSize, scaleInputToNetInputs);
^
In file included from /opt/openpose-master/include/openpose/pose/headers.hpp:10:0,
from /opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp:13:
/opt/openpose-master/include/openpose/pose/poseExtractorCaffe.hpp:22:14: note: candidate: virtual void op::PoseExtractorCaffe::forwardPass(const std::vector<op::Array<float> >&, const op::Point<int>&, const std::vector<double>&)
void forwardPass(const std::vector<Array<float>>& inputNetData, const Point<int>& inputDataSize,
^
/opt/openpose-master/include/openpose/pose/poseExtractorCaffe.hpp:22:14: note: no known conversion for argument 1 from 'op::Array<float>' to 'const std::vector<op::Array<float> >&'
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:62: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o' failed
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
how to compile this library on Windows?
The instructions say "Add the folder containing PyOpenPose.so to your PYTHONPATH." but what I see is this:
hostname% find $OPENPOSE_ROOT -name '*.so' -print
/usr/local/openpose/build/src/openpose/3d/libopenpose_3d.so
/usr/local/openpose/build/src/openpose/core/libopenpose_core.so
/usr/local/openpose/build/src/openpose/experimental/tracking/libopenpose_tracking.so
/usr/local/openpose/build/src/openpose/face/libopenpose_face.so
/usr/local/openpose/build/src/openpose/filestream/libopenpose_filestream.so
/usr/local/openpose/build/src/openpose/gpu/libopenpose_gpu.so
/usr/local/openpose/build/src/openpose/gui/libopenpose_gui.so
/usr/local/openpose/build/src/openpose/hand/libopenpose_hand.so
/usr/local/openpose/build/src/openpose/pose/libopenpose_pose.so
/usr/local/openpose/build/src/openpose/producer/libopenpose_producer.so
/usr/local/openpose/build/src/openpose/thread/libopenpose_thread.so
/usr/local/openpose/build/src/openpose/utilities/libopenpose_utilities.so
/usr/local/openpose/build/src/openpose/wrapper/libopenpose_wrapper.so
/usr/local/openpose/build/src/openpose/libopenpose.so
Should I be adding /usr/local/openpose/build/src/openpose to $PYTHONPATH, or am I missing a step?
As the title shown, what is problem ?
I'm getting the following errors when trying to build PyOpenPose:
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:51:23: error: cannot declare field ‘OpenPoseWrapper::PrivateData::faceExtractor’ to be of abstract type ‘op::FaceExtractor’
op::FaceExtractor faceExtractor;
^
In file included from /home/liffon/openpose/include/openpose/face/headers.hpp:7:0,
from /home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:13:
/home/liffon/openpose/include/openpose/face/faceExtractor.hpp:14:18: note: because the following virtual functions are pure within ‘op::FaceExtractor’:
class OP_API FaceExtractor
^
/home/liffon/openpose/include/openpose/face/faceExtractor.hpp:48:22: note: virtual void op::FaceExtractor::forwardPass(const std::vector<op::Rectangle<float> >&, const cv::Mat&, double)
virtual void forwardPass(const std::vector<Rectangle<float>>& faceRectangles, cons
^
/home/liffon/openpose/include/openpose/face/faceExtractor.hpp:71:22: note: virtual void op::FaceExtractor::netInitializationOnThread()
virtual void netInitializationOnThread() = 0;
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:55:23: error: cannot declare field ‘OpenPoseWrapper::PrivateData::handExtractor’ to be of abstract type ‘op::HandExtractor’
op::HandExtractor handExtractor;
^
In file included from /home/liffon/openpose/include/openpose/hand/headers.hpp:7:0,
from /home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:14:
/home/liffon/openpose/include/openpose/hand/handExtractor.hpp:14:18: note: because the following virtual functions are pure within ‘op::HandExtractor’:
class OP_API HandExtractor
^
/home/liffon/openpose/include/openpose/hand/handExtractor.hpp:53:22: note: virtual void op::HandExtractor::forwardPass(std::vector<std::array<op::Rectangle<float>, 2ul> >, const cv::Mat&, double)
virtual void forwardPass(const std::vector<std::array<Rectangle<float>, 2>> handRe
^
/home/liffon/openpose/include/openpose/hand/handExtractor.hpp:78:22: note: virtual void op::HandExtractor::netInitializationOnThread()
virtual void netInitializationOnThread() = 0;
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In constructor ‘OpenPoseWrapper::PrivateData::PrivateData(const op::Point<int>&, const op::Point<int>&, const op::Point<int>&, const op::Point<int>&, const op::Point<int>&, const op::PoseModel&, const string&, int, float, float, const std::vector<op::HeatMapType>&, const op::ScaleMode&)’:
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:41:114: error: too many initializers for ‘op::CvMatToOpInput’
r{netInputSizeFace, netOutputSizeFace, modelFolder, 0, 1, 0.4, heatMapTypes, heatMapScale}
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:41:114: error: too many initializers for ‘op::CvMatToOpOutput’
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:41:114: error: no matching function for call to ‘op::PoseGpuRenderer::PoseGpuRenderer(<brace-enclosed initializer list>)’
In file included from /home/liffon/openpose/include/openpose/pose/headers.hpp:11:0,
from /home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:12:
/home/liffon/openpose/include/openpose/pose/poseGpuRenderer.hpp:16:9: note: candidate: op::PoseGpuRenderer::PoseGpuRenderer(op::PoseModel, const std::shared_ptr<op::PoseExtractor>&, float, bool, float, float, unsigned int)
PoseGpuRenderer(const PoseModel poseModel, const std::shared_ptr<PoseExtractor>& p
^
/home/liffon/openpose/include/openpose/pose/poseGpuRenderer.hpp:16:9: note: no known conversion for argument 1 from ‘const op::Point<int>’ to ‘op::PoseModel’
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:41:114: error: no matching function for call to ‘op::FaceExtractor::FaceExtractor(<brace-enclosed initializer list>)’
r{netInputSizeFace, netOutputSizeFace, modelFolder, 0, 1, 0.4, heatMapTypes, heatMapScale}
^
In file included from /home/liffon/openpose/include/openpose/face/headers.hpp:7:0,
from /home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:13:
/home/liffon/openpose/include/openpose/face/faceExtractor.hpp:22:18: note: candidate: op::FaceExtractor::FaceExtractor(const op::Point<int>&, const op::Point<int>&, const std::vector<op::HeatMapType>&, op::ScaleMode)
explicit FaceExtractor(const Point<int>& netInputSize, const Point<int>& netOutput
^
/home/liffon/openpose/include/openpose/face/faceExtractor.hpp:22:18: note: candidate expects 4 arguments, 6 provided
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:41:114: error: no matching function for call to ‘op::HandExtractor::HandExtractor(<brace-enclosed initializer list>)’
r{netInputSizeFace, netOutputSizeFace, modelFolder, 0, 1, 0.4, heatMapTypes, heatMapScale}
^
In file included from /home/liffon/openpose/include/openpose/hand/headers.hpp:7:0,
from /home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:14:
/home/liffon/openpose/include/openpose/hand/handExtractor.hpp:25:18: note: candidate: op::HandExtractor::HandExtractor(const op::Point<int>&, const op::Point<int>&, short unsigned int, float, const std::vector<op::HeatMapType>&, op::ScaleMode)
explicit HandExtractor(const Point<int>& netInputSize, const Point<int>& netOutput
^
/home/liffon/openpose/include/openpose/hand/handExtractor.hpp:25:18: note: candidate expects 6 arguments, 8 provided
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘void OpenPoseWrapper::detectPose(const cv::Mat&)’:
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:131:71: error: ‘class op::CvMatToOpInput’ has no member named ‘format’
std::tie(netInputArray, scaleRatios) = membersPtr->cvMatToOpInput.format(rgb);
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:133:96: error: no matching function for call to ‘op::PoseExtractorCaffe::forwardPass(op::Array<float>&, <brace-enclosed initializer list>, std::vector<float>&)’
bersPtr->poseExtractorCaffe.forwardPass(netInputArray, {rgb.cols, rgb.rows}, scaleRatios);
^
In file included from /home/liffon/openpose/include/openpose/pose/headers.hpp:10:0,
from /home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:12:
/home/liffon/openpose/include/openpose/pose/poseExtractorCaffe.hpp:24:14: note: candidate: virtual void op::PoseExtractorCaffe::forwardPass(const op::Array<float>&, const op::Point<int>&, const std::vector<double>&)
void forwardPass(const Array<float>& inputNetData, const Point<int>& inputDataSize
^
/home/liffon/openpose/include/openpose/pose/poseExtractorCaffe.hpp:24:14: note: no known conversion for argument 3 from ‘std::vector<float>’ to ‘const std::vector<double>&’
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘void OpenPoseWrapper::detectFace(const cv::Mat&)’:
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:139:86: error: ‘BOOST_THROW_EXCEPTION’ was not declared in this scope
BOOST_THROW_EXCEPTION(std::runtime_error("Face network was not initialized."));
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘void OpenPoseWrapper::detectFace(const cv::Mat&, const cv::Mat&)’:
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:155:86: error: ‘BOOST_THROW_EXCEPTION’ was not declared in this scope
BOOST_THROW_EXCEPTION(std::runtime_error("Face network was not initialized."));
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:159:120: error: ‘BOOST_THROW_EXCEPTION’ was not declared in this scope
td::runtime_error("Invalid face rectangles format. Expected Nx4 mat with type CV_32SC1"));
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘void OpenPoseWrapper::detectHands(const cv::Mat&)’:
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:174:86: error: ‘BOOST_THROW_EXCEPTION’ was not declared in this scope
BOOST_THROW_EXCEPTION(std::runtime_error("Hand network was not initialized."));
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘void OpenPoseWrapper::detectHands(const cv::Mat&, const cv::Mat&)’:
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:193:86: error: ‘BOOST_THROW_EXCEPTION’ was not declared in this scope
BOOST_THROW_EXCEPTION(std::runtime_error("Hand network was not initialized."));
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:197:120: error: ‘BOOST_THROW_EXCEPTION’ was not declared in this scope
td::runtime_error("Invalid hand rectangles format. Expected Nx8 mat with type CV_32SC1"));
^
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘cv::Mat OpenPoseWrapper::render(const cv::Mat&)’:
/home/liffon/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:214:77: error: ‘class op::CvMatToOpOutput’ has no member named ‘format’
std::tie(scaleInputToOutput, outputArray) = membersPtr->cvMatToOpOutput.format(rgb);
^
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:62: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o' failed
If I'm correct, the error messages about op::FaceExtractor
and op::HandExtractor
messages are caused by a commit in OpenPose that changed them to be abstract classes.
The Boost errors I'm guessing are caused by this commit in OpenPose that caused Boost to no longer be included in the OpenPose headers (so we probably have to include them explicitly from PyOpenPose).
The ones with op::CvMatToOpInput
and op::CvMatToOpOutput
seem to come from the same commit as the op::FaceExtractor
and op::HandExtractor
errors, as does the op::PoseGpuRenderer
one.
It might be worth mentioning that I've compiled OpenPose using CMake and installed it system-wide with sudo make install
as suggested by the OpenPose documentation.
When i run original Openpose with a video its gave 11-12 fps on my GPU but when i run PyOpenPose with same video and same GPU, its gave only 2-3 fps. Why???
I had to change a non-obvious true flag to false in OpenPoseWrapper and the pose renderer (here poseRenderer{poseModel, nullptr, 0.05, false, blendAlpha}
) to achieve this and it took me a while to find out. Could you make it less obscure for future users? Thank you.
Hi, i just get the following error "Segmentation fault (core dumped)" when i run the example code in "script" folder.
I change the syntax "cap = cv2.VideoCapture(0)" to "cap = cv2.VideoCapture('video.avi')" because my server didnt connect to webcam so i want to run video from file. All example code get the same error "Segmentation fault (core dumped)"
I am using python 2.7, opencv 3.3.0, linux Ubuntu 14.04.5
What should i do?
Hello,
i am trying to build PyOpenPose in a Ubuntu 16.04 Docker Container.
After creating the build
folder i use cmake ..
and get the following output, which looks good to me:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Install prefix is set to: /usr/local
Generating with build type: Release
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "8.0")
-- Found OpenCV: /usr/local (found suitable version "3.4.0", minimum required is "3")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- python-py35
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found suitable exact version "3.5.2")
--
-- The following REQUIRED packages have been found:
* Threads
* CUDA
* OpenCV (required version >= 3)
* Boost
* PythonLibs (required version == 3)
-- The following OPTIONAL packages have not been found:
* Doxygen
-- Configuring done
-- Generating done
-- Build files have been written to: /pyopenpose/build
Unfortunately, the next step (running make
in the build
folder) fails with the following error:
Scanning dependencies of target PyOpenPose
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
[ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
/pyopenpose/PyOpenPoseLib/opencv_expose.cpp:13:33: fatal error: numpy/ndarrayobject.h: No such file or directory
compilation terminated.
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:110: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o' failed
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o] Error 1
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I have looked up ndarrayobject.h
and it exists at the following path:
/usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarrayobject.h
Can you please help me include this required file in the make process?
Thank you!
Building on CentOS 7.
I've built Boost 1.66 and set BOOST_ROOT and BOOST_LIBRARYDIR environment variables, as well as OPENPOSE_ROOT appropriately.
What do I need to change to get rid of this error?
--- start ---
CMake Error at /usr/local/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
Unable to find the requested Boost libraries.
Boost version: 1.53.0
Boost include path: /usr/include
Could not find the following Boost libraries:
boost_python-py27
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
--- end ---
Thank you.
In a multi-GPU environment how to chose which one to use by PyOpenPose?
Hi, I get the following error when I try to import PyOpenPose in python2.7
undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
I am running Ubuntu 16 and the latest version of boost. Any idea what I should do?
Many thanks
How could I delete the OpenPose wrapper object and effectively free memory and then recreate another one? I need to parse different sized videos in a loop.
net.getKeypoints(net.KeypointType.POSE)[0] will give:
[[[1.3709573e+02 4.4816448e+01 8.4558737e-01]
[1.0900942e+02 9.6915657e+01 7.9864156e-01]
[6.2908417e+01 1.1497624e+02 7.2661859e-01]
[0.0000000e+00 0.0000000e+00 0.0000000e+00]
[0.0000000e+00 0.0000000e+00 0.0000000e+00]
[1.5910754e+02 7.2995354e+01 7.7913237e-01]
[1.8509633e+02 1.3298206e+02 7.5067937e-01]
.......
[0.0000000e+00 0.0000000e+00 0.0000000e+00]]]
How to scale these ouput to like json output?
Firstly, I build PyOPenPose with python 2.7, the scripts/OpLoop.py works fine.
Secondly, I build it with python 3.6, building is fine, but run scripts/OpLoop.py by getting the error:
Traceback (most recent call last):
File "OpLoop.py", line 95, in
run()
File "OpLoop.py", line 42, in run
op = OP.OpenPose((320, 240), (240, 240), (640, 480), b"COCO", MODELS, 0, download_heatmaps)
Boost.Python.ArgumentError: Python argument types in
OpenPose.init(OpenPose, tuple, tuple, tuple, bytes, bytes, int, bool)
did not match C++ signature:
init(object*, cv::Size, cv::Size_, cv::Size_, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, int, bool, OpenPoseWrapper::ScaleMode, bool, bool, int)
init(object*, cv::Size, cv::Size, cv::Size, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, int, bool, OpenPoseWrapper::ScaleMode, bool, bool)
init(object*, cv::Size, cv::Size, cv::Size, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, int, bool, OpenPoseWrapper::ScaleMode, bool)
init(object*, cv::Size, cv::Size, cv::Size, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, int, bool, OpenPoseWrapper::ScaleMode)
init(object*, cv::Size, cv::Size, cv::Size, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, int, bool)
init(object*, cv::Size, cv::Size, cv::Size, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, int)
init(object*, cv::Size, cv::Size, cv::Size)
init(_object*)
init(_object*)
Does anyone know how to solve this error?
thanks.
First of all thanks for the project. I just found that it always uses "gpu 0", and I'd like to use multiple gpus to speed up inference, or I want to create multiple objects to use different gpu. It seems useful to me but I am not familiar with how to modify the code to add this feature..
I got this error when build against openpose v1.2.1-1.
Hi,
after installing Opencv3.3, Openpose (work great !), I want to try PyOpenPose (thanks for your work).
I have this output when I launch "make" :
/pyopenpose/build$ make
Install prefix is set to: /usr/local
Generating with build type: Release
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- python-py27
--
-- The following OPTIONAL packages have been found:
* Doxygen
-- The following REQUIRED packages have been found:
* Threads
* CUDA
* OpenCV (required version >= 3)
* Boost
* PythonLibs (required version == 2.7)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hugo/pyopenpose/build
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
/home/hugo/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘void OpenPoseWrapper::detectFace(const cv::Mat&)’:
/home/hugo/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:148:86: error: no matching function for call to ‘op::FaceDetector::detectFaces(const op::Array<float>&, float)’
const auto faceRectsOP = membersPtr->faceDetector.detectFaces(poseKeypoints, 1.0f);
^
In file included from /usr/local/include/openpose/face/headers.hpp:5:0,
from /home/hugo/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:14:
/usr/local/include/openpose/face/faceDetector.hpp:14:39: note: candidate: std::vector<op::Rectangle<float> > op::FaceDetector::detectFaces(const op::Array<float>&) const
std::vector<Rectangle<float>> detectFaces(const Array<float>& poseKeypoints) const;
^
/usr/local/include/openpose/face/faceDetector.hpp:14:39: note: candidate expects 1 argument, 2 provided
/home/hugo/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘void OpenPoseWrapper::detectHands(const cv::Mat&)’:
/home/hugo/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:184:86: error: no matching function for call to ‘op::HandDetector::detectHands(const op::Array<float>&, float)’
const auto handRectsOP = membersPtr->handDetector.detectHands(poseKeypoints, 1.0f);
^
In file included from /usr/local/include/openpose/hand/headers.hpp:5:0,
from /home/hugo/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:15:
/usr/local/include/openpose/hand/handDetector.hpp:17:54: note: candidate: std::vector<std::array<op::Rectangle<float>, 2ul> > op::HandDetector::detectHands(const op::Array<float>&) const
std::vector<std::array<Rectangle<float>, 2>> detectHands(const Array<float>& poseKeypoints) const;
^
/usr/local/include/openpose/hand/handDetector.hpp:17:54: note: candidate expects 1 argument, 2 provided
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:62 : la recette pour la cible « PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o » a échouée
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o] Erreur 1
CMakeFiles/Makefile2:117 : la recette pour la cible « PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all » a échouée
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Erreur 2
Makefile:127 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
Openpose build correctly and install without problem ...
Thanks !
Hello,
Couldn't get PyOpenPose to be imported in python3
I corrected one mistake : it was linking against boost-python-2.7
So in CMakeLists.txt I modified :
find_package(Boost COMPONENTS system "python" REQUIRED)
find_package(Boost COMPONENTS system "python-py35" REQUIRED)
Compilation works fine but upon importing though it seems to be going further but now I encounter an error which doesn't give any search result :
import PyOpenPose
ImportError: /home/username/PyOpenPose/build/PyOpenPoseLib/PyOpenPose.so: undefined symbol: _ZN2op18FaceExtractorCaffeC1ERKNS_5PointIiEES4_RKSsiRKSt6vectorINS_11HeatMapTypeESaIS8_EENS_9ScaleModeEb
I checked out commit of openPose e086e6fc6a5f4650d5c3a100b8ced8363fd2d099 (which is the number you indicate) which was compiled successfully with cmake and then installed with make install
Thank you for your help
Hi, I'm install PyOpenPose on Ubuntu 14.04, and I've installed OpenPose on the machine, and caffe is installed too. When building PyOpenPose, I meet the following errors.
When "cmake ..", it seems all right:
Generating with build type: Release
CMake Warning at /usr/local/share/cmake-3.10/Modules/FindBoost.cmake:1610 (message):
No header defined for python-py27; skipping header check
Call Stack (most recent call first):
CMakeLists.txt:54 (find_package)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- system
-- python-py27
-- The following OPTIONAL packages have been found:
* Doxygen
-- The following REQUIRED packages have been found:
* Threads
* CUDA
* OpenCV (required version >= 3)
* Boost
* PythonLibs (required version == 2.7)
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/PyOpenPose/build
Then the following command "make" the following error occured:
```[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
/data/face-retargeting/lixing/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘cv::Mat OpenPoseWrapper::getHeatmaps()’:
/path/to/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:272:60: error: ‘class op::PoseExtractorCaffe’ has no member named ‘getHeatMapsCopy’
op::Array<float> maps = membersPtr->poseExtractorCaffe.getHeatMapsCopy();
^
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o] error 1
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] error 2
make: *** [all] error 2
Any ideas? Am I missed something? Thank you!
Building pyopenpose (latest master) is broken since openpose commit CMU-Perceptual-Computing-Lab/openpose@29ea7e2 (I checked the previous commits, and they worked fine).
/software/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function 'void OpenPoseWrapper::detectFace(const cv::Mat&)':
/software/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:148:86: error: no matching function for call to 'op::FaceDetector::detectFaces(const op::Array&, float)'
const auto faceRectsOP = membersPtr->faceDetector.detectFaces(poseKeypoints, 1.0f);
^
In file included from /software/openpose/include/openpose/face/headers.hpp:5:0,
from /software/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:14:
/software/openpose/include/openpose/face/faceDetector.hpp:14:39: note: candidate: std::vector<op::Rectangle > op::FaceDetector::detectFaces(const op::Array&) const
std::vector<Rectangle> detectFaces(const Array& poseKeypoints) const;
^
/software/openpose/include/openpose/face/faceDetector.hpp:14:39: note: candidate expects 1 argument, 2 provided
/software/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function 'void OpenPoseWrapper::detectHands(const cv::Mat&)':
/software/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:184:86: error: no matching function for call to 'op::HandDetector::detectHands(const op::Array&, float)'
const auto handRectsOP = membersPtr->handDetector.detectHands(poseKeypoints, 1.0f);
^
In file included from /software/openpose/include/openpose/hand/headers.hpp:5:0,
from /software/pyopenpose/PyOpenPoseLib/OpenPoseWrapper.cpp:15:
/software/openpose/include/openpose/hand/handDetector.hpp:17:54: note: candidate: std::vector<std::array<op::Rectangle, 2ul> > op::HandDetector::detectHands(const op::Array&) const
std::vector<std::array<Rectangle, 2>> detectHands(const Array& poseKeypoints) const;
^
/software/openpose/include/openpose/hand/handDetector.hpp:17:54: note: candidate expects 1 argument, 2 provided
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:62: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o' failed
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o] Error 1
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Hi,
I'm successfully building PyOpenPose on my system but cannot use it because for some reasons I don't see it always gets linked against OpenCV 3.2 and OpenCV 3.3, the latter which does not exist on my machine. I've already tried to set 3.2 explicitly in CMakeLists.txt
but the links to 3.3 are still there. Iimporting the module in Python fails because it can't find the libraries.
Why does it insist on linking against OpenCV 3.3 even if I set it explicitly to 3.2?
Thanks
Hello,I am using PyOpenpose with below settings:
self.poseSize = (656, 368)
self.faceHandSize = (240, 240)
self.outSize = (640, 480)
self.modelType = "COCO"
self.logLevel = 0
self.downloadHeatmaps = False
self.detectFace = False
self.detectHands = False
Same python scripts+same settings as above,
under my laptop with a nvidia 1070 card,python wrapped openpose process consumed
1516MB GPU memory,
but under a server with nvidia 1080Ti card,openpose process consumed
7883MB GPU memory,
where does this big memory consumption comef from?Any parameter to specify GPU memory consumption?
(I have asked in openpose issue list:CMU-Perceptual-Computing-Lab/openpose#526 openpose guys said it isn't their problem)
when I make this project ,something happen as follow,any advices?thanks very much
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
/home/zzy/work/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function ‘cv::Mat OpenPoseWrapper::getHeatmaps()’:
/home/zzy/work/PyOpenPose/PyOpenPoseLib/OpenPoseWrapper.cpp:272:60: error: ‘class op::PoseExtractorCaffe’ has no member named ‘getHeatMapsCopy’
float> maps = membersPtr->poseExtractorCaffe.getHeatMaps
^
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:62: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o' failed
I build the PyOpenPose successfully and its detecting PythonLibs by default 3.5.2.
Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found version "3.5.2")
However, when i am trying to run the demo by running python ./OpLoop.py
i am getting error:
import PyOpenPose as OP
ImportError: /home/cvsion/Deeplearning/Openpose_old/PyOpenPose-master/build/PyOpenPoseLib/PyOpenPose.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
I am using Boost version 1.58.0. I have tried with un-installing Boost and install again but getting same error.
Hello,@christian-lanius @nkyriazis @padeler @oikonom I have configured pyopenpose but found when I run scrpit demo, i find: ModuleNotFoundError: No module named 'PyOpenPose',Can you provide this module?
I compiled the code through python 3.4 and it works fine. However, my other codes are python 2.7 and I want to put them together. How to change the code to add python 2.7 support?
Thanks,
Dear sir:
please look at this problem? Thanks.
[100%] Linking CXX shared library PyOpenPose.so
/usr/bin/ld: cannot find -lopenpose
/usr/bin/ld: cannot find -lcaffe
collect2: error: ld returned 1 exit status
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:177: recipe for target 'PyOpenPoseLib/PyOpenPose.so' failed
make[2]: *** [PyOpenPoseLib/PyOpenPose.so] Error 1
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Hello,
I'm trying to get the Python module running. It builds successful and installs into /usr/local/lib. That's fine by me.
But I cannot import it. The import crashes with the following error message:
ImportError: /usr/local/lib/PyOpenPose.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
which is probably due to the fact that PyOpenPose.so is linked against two different versions of Boost. The output of ldd (filtered by grep boost):
libboost_python.so.1.64.0 => /usr/local/lib/libboost_python.so.1.64.0 (0x00007f0e55abf000)
libboost_system.so.1.64.0 => /usr/local/lib/../lib/libboost_system.so.1.64.0 (0x00007f0e50f1f000)
libboost_filesystem.so.1.64.0 => /usr/local/lib/../lib/libboost_filesystem.so.1.64.0 (0x00007f0e50d04000)
libboost_thread.so.1.64.0 => /usr/local/lib/../lib/libboost_thread.so.1.64.0 (0x00007f0e4afe2000)
libboost_system.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0 (0x00007f0e275ec000)
libboost_filesystem.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0 (0x00007f0e24505000)
Boost 1.58 is installed via apt-get
in /usr/lib, Boost 1.64 is installed through the git clone/cmake/make chain in /usr/local/lib.
If I remove Boost 1.64 completely I cannot import PyOpenPose because it (or rather libopenpose) complains about it missing...
Any help would be greatly appreciated.
In [7]: rgb = cv2.imread('./galloping_knights.jpg')
In [8]: op.detectPose(rgb)
Segmentation fault (core dumped)
Hi, I am running PyOpenPose on AWS EC2 ubuntu14.0.4 and system default python2.7.6 I run make
and sudo make install
fine but I cannot import PyOpenPose in python. libopenpose.so is installed in /usr/local/lib.
there is another file with the same name in /home/ubuntu/PyOpenPose/build/PyOpenPoseLib.
if I add the first one into $PYTHONPATH
, it returns:
>>> import PyOpenPose Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: libopenpose.so.1.0.2: cannot open shared object file: No such file or directory
Or if i add the second on into $PYTHONPATH:
>>> import PyOpenPose Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /home/ubuntu/PyOpenPose/build/PyOpenPoseLib/PyOpenPose.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
Which according to some Discussion on Google is related to libboost.
Any suggestions?
Hi,
I've been able to initialize PyOpenPose now thanks to the advice from another issue here. Now I'm encountering a crash in the OpLoop.py example. It outputs a fairly long error message: https://pastebin.com/GLUJnX74
Thanks a lot for your help
I want to initialize an openose instance,save it as a class field,and this class implemented some grpc related logic,will listen on a port,and I want pass the request(an image) from this port to saved openpose instance for detection,then return back detection result to this port.
I implement my design like this:
class PosingServer:
def init(self, setting=PosingSetting):
self.setting=setting
self.initNetwork()
def detect(self, req):
#detect pose
net.detectPose(req.image)
#detect pose
return net.getKeypoints(net.KeypointType.POSE)[0]
def initNetwork(self):
setting = self.setting
self.net = OP.OpenPose(setting.poseSize, setting.faceHandSize, setting.outSize,\
setting.modelType, setting.modelFolder, setting.logLevel,\
setting.downloadHeatmaps)
grpc related stuffs**
After PosingServer running,it can receive rpc request and perform detection but this line:
return net.getKeypoints(net.KeypointType.POSE)[0]
gives error:
The CPU/GPU pointer data cannot be accessed from a different thread.
Coming from:
Coming from:
I am trying to build PyOpenPose on Ubuntu 16.04
~/work/PyOpenPose/build$ cmake ..
Install prefix is set to: /usr/local
Generating with build type: Release
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- python-py35
--
-- The following REQUIRED packages have been found:
* Threads
* CUDA
* OpenCV (required version >= 3)
* Boost
* PythonLibs (required version == 3)
-- The following OPTIONAL packages have not been found:
* Doxygen
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/work/PyOpenPose/build
make fails with:
~/work/PyOpenPose/build$ make
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
/home/user/work/PyOpenPose/PyOpenPoseLib/opencv_expose.cpp: In function 'int initialize_array()':
/home/user/work/PyOpenPose/PyOpenPoseLib/opencv_expose.cpp:32:14: error: 'bpy::numeric' has not been declared
bpy::numeric::array::set_module_and_type("numpy", "ndarray");
^
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:110: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o' failed
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o] Error 1
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
any ideas?
Hi, after installing OpenPose, Caffe with OpenCV3, and modifying my $PYTHONPATH
, I get an import error related with OpenPose and not really sure how to resolve
~$ echo $PYTHONPATH
/usr/local/PyOpenPose/build/PyOpenPoseLib:......
$ echo $OPENPOSE_ROOT
/usr/local/openpose
~$ python -c 'import PyOpenPose'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: libopenpose.so.1.2.1: cannot open shared object file: No such file or directory
Knowing the location of libopenpose.so.1.2.1
, I tried the following and got a different error...
$ cd $OPENPOSE_ROOT/build/src/openpose; ls libopenpose.so; python -c 'import PyOpenPose'
libopenpose.so
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /usr/local/PyOpenPose/build/PyOpenPoseLib/PyOpenPose.so: undefined symbol: _ZN5boost6python7numeric5array19set_module_and_typeEPKcS4_
Any ideas on what's missing?
Thanks in advance!
I build the PyOpenPose successfully, but when I run the test file OpLoop.py, I get this error. Could you give some advises to fix it? Thank you.
Starting initialization on thread. In src/openpose/pose/poseExtractorCaffe.cpp:netInitializationOnThread():44
Finished initialization on thread. In src/openpose/pose/poseExtractorCaffe.cpp:netInitializationOnThread():67
Starting initialization on thread. In src/openpose/pose/poseRenderer.cpp:initializationOnThread():81
Finished initialization on thread. In src/openpose/pose/poseRenderer.cpp:initializationOnThread():88
Starting initialization on thread. In src/openpose/face/faceExtractor.cpp:initializationOnThread():37
Finished initialization on thread. In src/openpose/face/faceExtractor.cpp:initializationOnThread():58
Starting initialization on thread. In src/openpose/face/faceRenderer.cpp:initializationOnThread():39
Finished initialization on thread. In src/openpose/face/faceRenderer.cpp:initializationOnThread():45
Starting initialization on thread. In src/openpose/hand/handExtractor.cpp:initializationOnThread():122
Finished initialization on thread. In src/openpose/hand/handExtractor.cpp:initializationOnThread():143
Starting initialization on thread. In src/openpose/hand/handRenderer.cpp:initializationOnThread():40
Finished initialization on thread. In src/openpose/hand/handRenderer.cpp:initializationOnThread():46
Entering main Loop.
Traceback (most recent call last):
File "OpLoop.py", line 84, in <module>
run()
File "OpLoop.py", line 50, in run
op.detectPose(rgb)
Boost.Python.ArgumentError: Python argument types in
OpenPose.detectPose(OpenPose, NoneType)
did not match C++ signature:
detectPose(OpenPoseWrapper {lvalue}, cv::Mat)
I am using Ubuntu 14.04, Opencv 3.1.0 and Boost 1.64.
PyOpenPose works with d28a85b80edb5080d85427896aa77e8c78767fb7
but the two most recent commits break the build.
I don't need any features that were introduced in the latest two commits but figured I would save people some time if they run into build issues.
Error (openpose/bc55f86cb82b309471cc64ae67d92cd95c0768bf):
Scanning dependencies of target PyOpenPose
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o
[ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
/opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp: In constructor 'OpenPoseWrapper::PrivateData::PrivateData(const op::Point<int>&, const op::Point<int>&, const op::Point<int>&, const op::PoseModel&, const string&, int, float, float, const std::vector<op::HeatMapType>&, const op::ScaleMode&)':
/opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp:42:129: error: no matching function for call to 'op::PoseExtractorCaffe::PoseExtractorCaffe(<brace-enclosed initializer list>)'
handExtractor{netInputSizeFaceAndHands, netInputSizeFaceAndHands, modelFolder, 0, 1, 0.4, heatMapTypes, heatMapScale}
^
In file included from /opt/openpose-master/include/openpose/pose/headers.hpp:10:0,
from /opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp:13:
/opt/openpose-master/include/openpose/pose/poseExtractorCaffe.hpp:13:9: note: candidate: op::PoseExtractorCaffe::PoseExtractorCaffe(op::PoseModel, const string&, int, const std::vector<op::HeatMapType>&, op::ScaleMode, bool)
PoseExtractorCaffe(const PoseModel poseModel, const std::string& modelFolder, const int gpuId,
^
/opt/openpose-master/include/openpose/pose/poseExtractorCaffe.hpp:13:9: note: candidate expects 6 arguments, 9 provided
/opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp: In member function 'cv::Mat OpenPoseWrapper::render(const cv::Mat&)':
/opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp:231:67: error: no matching function for call to 'op::PoseGpuRenderer::renderPose(op::Array<float>&, const op::Array<float>&)'
membersPtr->poseRenderer.renderPose(outputArray, poseKeypoints);
^
In file included from /opt/openpose-master/include/openpose/pose/headers.hpp:11:0,
from /opt/PyOpenPose-master/PyOpenPoseLib/OpenPoseWrapper.cpp:13:
/opt/openpose-master/include/openpose/pose/poseGpuRenderer.hpp:26:37: note: candidate: virtual std::pair<int, std::__cxx11::basic_string<char> > op::PoseGpuRenderer::renderPose(op::Array<float>&, const op::Array<float>&, float, float)
std::pair<int, std::string> renderPose(Array<float>& outputData, const Array<float>& poseKeypoints,
^
/opt/openpose-master/include/openpose/pose/poseGpuRenderer.hpp:26:37: note: candidate expects 4 arguments, 2 provided
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:62: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o' failed
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
Makefile:127: recipe for target 'all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
make: *** [all] Error 2
I am running PyOpenPose to obtain pose, face and hand keypoints for one and the same image.
I can't seem to find any explanation as to whether the persons in the persons, faces and hands objects (see code below) are guaranteed to be in the same order. PyOpenPose is running three separate commands, so it would be helpful to know that the order of the persons is the same in the pose, hands and face objects.
op.detectPose(image_arr) poses = self.op.getKeypoints(op.KeypointType.POSE)[0] op.detectFace(image_arr) faces = op.getKeypoints(op.KeypointType.FACE)[0] op.detectHands(image_arr) hands = op.getKeypoints(op.KeypointType.HAND)[0]
It would be great if this could be documented somewhere.
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
[ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
[100%] Linking CXX shared library PyOpenPose.so
/usr/bin/ld: cannot find -lopenpose
/usr/bin/ld: cannot find -lcaffe
collect2: error: ld returned 1 exit status
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:194: recipe for target 'PyOpenPoseLib/PyOpenPose.so' failed
make[2]: *** [PyOpenPoseLib/PyOpenPose.so] Error 1
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
@padeler I want to find the distance between wrist joint location to fingertip. For example, left wrist joint location to little fingertip. Any idea how to do this..... Help needed... Thanks
I am using opencv 2.4.11, it's not work. Do you use opencv 3?
I have:
The OpenPose examples run without any problem. And I am running in a virtualenv in order to keep my OpenCV versions separate.
However, after following the instructions, getting a successful build for OpenPose and PyOpenPose, I get a Bus Error and once segmentation fault when I attempt to import PyOpenPose into python. It does not matter whether I try to run the example scripts or try my own.
Can this be connected to running python in a virtualenv?
I use pyopenpse but only one GPU work, which setting can control GPU number
op = OP.OpenPose((320, 240), (240, 240), (640, 480), "COCO", OPENPOSE_ROOT + os.sep + "models" + os.sep, 0, download_heatmaps)
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.111 Driver Version: 384.111 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1080 Off | 00000000:83:00.0 Off | N/A |
| 40% 63C P2 65W / 180W | 1501MiB / 8114MiB | 40% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 1080 Off | 00000000:84:00.0 Off | N/A |
| 30% 47C P5 7W / 180W | 10MiB / 8114MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 176061 C python 1491MiB |
+-----------------------------------------------------------------------------+
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
[ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
/home/nan/PyOpenPose-master/PyOpenPoseLib/opencv_expose.cpp:13:33: fatal error: numpy/ndarrayobject.h: No such file or directory
compilation terminated.
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:110: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o' failed
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
As the title shown ,any one known this problem. I use the latest version of OpenPose which cause this problem?
Hi,
I followed the manual compilation instruction ( https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md ) to install Openpose. I have no idea how to copy headers and libraries to the system environment. Running 'make install' didn't work. Could you please help? Thanks.
Hello there,
I've been trying to build this with cmake but i keep getting the same error message.
this is what i can see from cmake-gui after following the solution from #15 and also setting OPENPOSE_ROOT properly.
but everytime I tried to build with cmake, the following is the error i got.
make
Scanning dependencies of target PyOpenPose
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
[ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
/home/sjoh/Projects/PyOpenPose-master/PyOpenPoseLib/opencv_expose.cpp:13:33: fatal error: numpy/ndarrayobject.h: No such file or directory
compilation terminated.
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:110: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o' failed
make[2]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o] Error 1
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Apparently I can find the 'ndarrayobject.h' file in '/usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarrayobject.h'
is there anything i got to edit? if so, could you please tell me how?
I want to initialize openpose as a field of a RPC server class,and this server will pass all detection requests to this field,the python implementation like this:
(I actually modified some source code of openpose,and described the modification in: CMU-Perceptual-Computing-Lab/openpose#387)
class PosingServer(RPCServer):
def test():
image=cv2.imread("test.png")
start = time.time()
self.net.detectPose(image)
print "Posing takes {} seconds".format(time.time() - start)
def detect(self, req):#this method to handle RPC request
self.test()
def initNetwork(self):
self.net= OP.OpenPose((656, 368), (240, 240), (640, 480),"COCO", "/pathToModel", 0,False)
self.test()
As you can see both methods invoke the test() to perform detection on same image,and successfully,but
invoking from initNetwork() takes 13.1403679848 seconds,and it will decrease in follow-up invokings but will stay at 2~3 seconds after 4~5 times
invoking from detect() takes 0.40030002594 seconds
Where does this difference come from?
How to solve this problem?
Scanning dependencies of target PyOpenPose
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o
[ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o
[ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o
[100%] Linking CXX shared library PyOpenPose.so
/usr/bin/ld: cannot find -lopenpose
/usr/bin/ld: cannot find -lcaffe
collect2: error: ld returned 1 exit status
PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:202: recipe for target 'PyOpenPoseLib/PyOpenPose.so' failed
make[2]: *** [PyOpenPoseLib/PyOpenPose.so] Error 1
CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed
make[1]: *** [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.