openpose icon indicating copy to clipboard operation
openpose copied to clipboard

[QUESTION] When executing openpose Python API examples09:~/openpose/build/examples/tutorial_api_python/09_keypoints_from_heatmaps.py

Open Pinocchioo opened this issue 5 years ago • 11 comments

ubuntu:20.04,cuda:10.02,cudnn:7.6.5,python:3.6.12 installed by conda,cmake:3.16.3, Pybind11 module report errors when executing openpose Python API examples09:09_keypoints_from_heatmaps.py.The error report is as follows:

Starting OpenPose Python Wrapper...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
emplaceAndPop(): incompatible function arguments. The following argument types are supported:
    1. (self: openpose.pyopenpose.WrapperPython, arg0: std::vector<std::shared_ptr<op::Datum>, std::allocator<std::shared_ptr<op::Datum> > >) -> bool

Invoked with: <openpose.pyopenpose.WrapperPython object at 0x7fab91920e30>, [<openpose.pyopenpose.Datum object at 0x7fab91920fb8>]

Did you forget to `#include <pybind11/stl.h>`? Or <pybind11/complex.h>,
<pybind11/functional.h>, <pybind11/chrono.h>, etc. Some automatic
conversions are optional and require extra headers to be included
when compiling your pybind11 module.

I compile the library by cmake —— make -j —— make install the source code that git clone from the openpose git. After installing the openpose library, I ran the python API example and reported an error. cmake-gui: What I modified is:

BUILD_PYTHON ON
Add_Entry:
PYTHON_EXECUTABLE = /home/pinocchio/anaconda3/envs/openpose/bin/python3.6m
PYTHON_LIBRARY = 
/home/pinocchio/anaconda3/envs/openpose/lib/libpython3.6m.so

I didn't make any changes to the source code. I just installed the library, and ran the example. And I don't know why ,I hope someone can answer it. Thank you very much.

Pinocchioo avatar Nov 20 '20 01:11 Pinocchioo

I met this problem in latest openpose V1.7 from git downloading. Now this problem has been solved, after I downloaded the v1.6 relsaseed version of the openpose. So I think the official examples have some wrong place in latest openpose_python_api example_09.

Pinocchioo avatar Nov 21 '20 02:11 Pinocchioo

And someone had also met this problem. https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/1718

Pinocchioo avatar Nov 21 '20 02:11 Pinocchioo

After changing openpose from 1.7 to 1.6, python api works finally. Thanks! :)

sunshinnnn avatar Nov 26 '20 14:11 sunshinnnn

Are you sure, I just got the latest version from master, and running:

python3 08_heatmaps_from_image.py

works for me

@gineshidalgo99 Is V1.7 referencing current master?

soulslicer avatar Dec 02 '20 16:12 soulslicer

Are you sure, I just got the latest version from master, and running:

python3 08_heatmaps_from_image.py

works for me

@gineshidalgo99 Is V1.7 referencing current master?

What the problem I met is :

python 09_keypoints_from_heatmaps.py

And python 08_heatmaps_from_image.py in V1.7 latest is also works for me.

Pinocchioo avatar Dec 09 '20 09:12 Pinocchioo

Yes, you are right.

Line 58 is suppose to be:

opWrapper.emplaceAndPop(op.VectorDatum([datum]))

Would you like the opportunity to make a PR, or shall i push the fix

soulslicer avatar Dec 11 '20 20:12 soulslicer

Yes, you are right.

Line 58 is suppose to be:

opWrapper.emplaceAndPop(op.VectorDatum([datum]))

Would you like the opportunity to make a PR, or shall i push the fix

My Pr: https://github.com/CMU-Perceptual-Computing-Lab/openpose/pull/1794 But it report error , maybe opWrapper.emplaceAndPop(op.VectorDatum([datum])) is incorrect .

Pinocchioo avatar Dec 12 '20 03:12 Pinocchioo

Yes, you are right. Line 58 is suppose to be:

opWrapper.emplaceAndPop(op.VectorDatum([datum]))

Would you like the opportunity to make a PR, or shall i push the fix

My Pr: #1794 But it report error , maybe opWrapper.emplaceAndPop(op.VectorDatum([datum])) is incorrect .

Hmm that's not possible. I literally just tested it last week. What error do you get

soulslicer avatar Dec 20 '20 02:12 soulslicer

I meet this problem too,and i replace code opWrapper.emplaceAndPop([datum]) to opWrapper.emplaceAndPop(op.VectorDatum([datum])) ,then everythings going well.

Deeperfinder avatar Apr 14 '21 14:04 Deeperfinder

I meet this problem too,and i replace code opWrapper.emplaceAndPop([datum]) to opWrapper.emplaceAndPop(op.VectorDatum([datum])) ,then everythings going well.

thank u ! u fix my problem!

zxwblublu avatar May 30 '21 08:05 zxwblublu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 07:01 stale[bot]