Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Pinocchioo opened this issue Nov 20, 2020 · 11 comments

Comments

@Pinocchioo
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

And someone had also met this problem.
#1718

@sunshinnnn
Copy link

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

@soulslicer
Copy link
Collaborator

soulslicer commented Dec 2, 2020

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?

@Pinocchioo
Copy link
Contributor Author

Pinocchioo commented Dec 9, 2020

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.

@soulslicer
Copy link
Collaborator

soulslicer commented Dec 11, 2020

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

@Pinocchioo
Copy link
Contributor Author

Pinocchioo commented Dec 12, 2020

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 .

@soulslicer
Copy link
Collaborator

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

@Deeperfinder
Copy link

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

@zxwblublu
Copy link

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!

@stale
Copy link

stale bot commented Jan 9, 2022

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 stale bot added the stale/old label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants