FORTH-ModelBasedTracker / PyOpenPose

Python bindings for the Openpose library
BSD 3-Clause "New" or "Revised" License
287 stars 80 forks source link

Make Problem (error 2) #41

Closed worldhugo closed 6 years ago

worldhugo commented 6 years ago

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 !

padeler commented 6 years ago

Current PyOpenPose version builds with this commit.

Since the openpose api changes fast, PyOpenPose is usually a bit behind in compatibility. I will update the code to work with the latest openpose version as soon as possible, meanwhile you can try it with the above commit.

worldhugo commented 6 years ago

It's ok, with last commit of OpenPose (03/04/2018), in OpenPoseWrapper.cpp :

const auto faceRectsOP = membersPtr->faceDetector.detectFaces(poseKeypoints, 1.0f);

to

const auto faceRectsOP = membersPtr->faceDetector.detectFaces(poseKeypoints);

const auto handRectsOP = membersPtr->handDetector.detectHands(poseKeypoints, 1.0f);

to :

const auto handRectsOP = membersPtr->handDetector.detectHands(poseKeypoints);

Thanks for all !