fabiozappo / SkeletonGroupActivityRecognition

Learning Group Activities from Skeletons without Individual Action Labels
Apache License 2.0
21 stars 3 forks source link

Skeleton extraction - emplaceAndPop(): incompatible function arguments #2

Closed daniel-richter closed 3 years ago

daniel-richter commented 3 years ago

When running extract_sekeletons.py I ran into the following issue:

python3 extract_skeletons.py --no_display --save Starting OpenPose Python Wrapper... Auto-detecting all available GPUs... Detected 8 GPU(s), using 8 of them starting at GPU 0. 0%| | 0/563270 [00:00<?, ?it/s] Traceback (most recent call last): File "extract_skeletons.py", line 49, in opWrapper.emplaceAndPop([datum]) TypeError: emplaceAndPop(): incompatible function arguments. The following argument types are supported:

  1. (self: pyopenpose.WrapperPython, arg0: std::vector<std::shared_ptr, std::allocator<std::shared_ptr > >) -> bool

Invoked with: <pyopenpose.WrapperPython object at 0x7f2bb0c94a08>, [<pyopenpose.Datum object at 0x7f2b38336420>]

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.

According to https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/1762 it's an issue with OpenPose v1.7 (v1.6 should work). What is strange, because your Dockerfile checks out a specific OpenPose commit.

Anyway, I could solve this specific issue by replacing https://github.com/fabiozappo/SkeletonGroupActivityRecognition/blob/85d84dace149346043f87638b03fd4995038471c/extract_skeletons.py#L49 with

opWrapper.emplaceAndPop(op.VectorDatum([datum]))
fabiozappo commented 3 years ago

Hi Daniel,

Thank you for your contribution. This is really weird as it always worked on my pc, are you running the code using my provided container? If the answer is yes could you please do a pull request?

daniel-richter commented 3 years ago

To be honest, I don't exactly. I used the "skeleton-group-activity-recognition" image I build two weeks ago and I guess I used your original docker/docker-compose build. Since there is an easy workaround for the issue above, I thought it would be nice to post it anyway.

I'll try to rebuild the image from scratch later and let you know the results.

fabiozappo commented 3 years ago

I did a check and current repo code works well following my instructions and using provided container.

I also tried to change line: opWrapper.emplaceAndPop([datum])

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

but following error appear AttributeError: module 'pyopenpose' has no attribute 'VectorDatum'

Let me know if using my container and code still give you an error