Openpose: opWrapper.emplaceAndPop([datum]) crashing

Created on 12 Oct 2020  ·  9Comments  ·  Source: CMU-Perceptual-Computing-Lab/openpose

I've noticed that when I try to run openpose for more than one image in a loop or using live feed webcam, the code tends to stall and crashes when it reaches opWrapper.emplaceAndPop([datum]). After reading the documentations, this function calls the following two functions:

  1. opWrapper.waitAndEmplace([datum])
  2. opWrapper.waitAndPop([datum])

I've tried using these functions instead and the same issue occurs. It seems that the crash occurs when I try to waitAndPop the datum as when I run only the waitAndEmplace in a while loop, it will run about 70 times before crashing given that I assume its because the queue is full. Is there a way to solve this issue or would you perhaps know any reason why this might be the case?

Python

All 9 comments

Can you give me a sample python code that i can run to fix it

Hi, have you solved this problem? I meet a problem kind of like this. I run the examples in tutorial_api_python folder and the single gpu examples run well but multi_gpu examples raise error as below:
Starting OpenPose Python Wrapper...
waitAndEmplace(): incompatible function arguments. The following argument types are supported:
1. (self: openpose.pyopenpose.WrapperPython, arg0: std::vector, std::allocator > >) -> bool

Invoked with: , []

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

Same problem here.
Ubunutu 18.04
Tried with both Cuda 10.2 and 11.1
Cudnn 7.5

I'll be looking into this issue next week. The code examples were running fine the last time I tested about a few months ago

Hey, I found a mistake in my own code yesterday. I changed 'waitAndEmpalce([datum]) to  'waitAndEmpalce(op.VectorDatum([datum])). It works but I can't understand why some official python api examples use '[datum]' and some need to add 'op.VectorDatum'.

------------------ 原始邮件 ------------------
发件人: "Raaj"<[email protected]>;
发送时间: 2020年11月19日(星期四) 晚上10:08
收件人: "CMU-Perceptual-Computing-Lab/openpose"<[email protected]>;
抄送: "武少广"<[email protected]>; "Comment"<[email protected]>;
主题: Re: [CMU-Perceptual-Computing-Lab/openpose] opWrapper.emplaceAndPop([datum]) crashing (#1718)

I'll be looking into this issue next week. The code examples were running fine the last time I tested about a few months ago


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi, have you solved this problem? I meet a problem kind of like this. I run the examples in tutorial_api_python folder and the single gpu examples run well but multi_gpu examples raise error as below:
Starting OpenPose Python Wrapper...
waitAndEmplace(): incompatible function arguments. The following argument types are supported:

  1. (self: openpose.pyopenpose.WrapperPython, arg0: std::vector bool

Invoked with: , []

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

Hi, have you solved this problem ? I also 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.

Hey, I found a mistake in my own code yesterday. I changed 'waitAndEmpalce([datum]) to  'waitAndEmpalce(op.VectorDatum([datum])). It works but I can't understand why some official python api examples use '[datum]' and some need to add 'op.VectorDatum'.

------------------ 原始邮件 ------------------ 发件人: "Raaj"<[email protected]>; 发送时间: 2020年11月19日(星期四) 晚上10:08 收件人: "CMU-Perceptual-Computing-Lab/openpose"<[email protected]>; 抄送: "武少广"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [CMU-Perceptual-Computing-Lab/openpose] opWrapper.emplaceAndPop([datum]) crashing (#1718) I'll be looking into this issue next week. The code examples were running fine the last time I tested about a few months ago — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

I also received the same issue and tried using opWrapper.emplaceAndPop(op.VectorDatum([datum]), it builds but when I run it it would say the following:

AttributeError: 'numpy.ndarray' object has no attribute 'VectorDatum'

I tried saving a frame and it seems that its able to provide and place the keypoints once but then it would run into the error mentioned afterwards. Did any one of you encountered the same problem?

Hi can you guys provide me a code snippet to run that is causing your issues? I have run all the existing samples and they appear to work

@lonelygoatherd Yes you are suppose to use the following syntax:

datum = op.Datum()
imageToProcess = cv2.imread(imagePath)
datum.cvInputData = imageToProcess
opWrapper.emplaceAndPop(op.VectorDatum([datum]))
Was this page helpful?
0 / 5 - 0 ratings