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

Something went wrong while importing Openpose #10

Open
mesakarghm opened this issue Aug 25, 2020 · 6 comments
Open

Something went wrong while importing Openpose #10

mesakarghm opened this issue Aug 25, 2020 · 6 comments
Labels
good first issue Good for newcomers

Comments

@mesakarghm
Copy link

While performing analysis on Video, I run into the following error. The app works with the pictures, the following problem arises only when video is selected.

Something went wrong when importing OpenPose
Debugging middleware caught exception in streamed response at a point where response headers were already sent.
Traceback (most recent call last):
File "C:\Users\Devil\AppData\Roaming\Python\Python37\site-packages\werkzeug\wsgi.py", line 506, in next
return self._next()
File "C:\Users\Devil\AppData\Roaming\Python\Python37\site-packages\werkzeug\wrappers\base_response.py", line 45, in _iter_encoded
for item in iterable:
File "D:\GritFeat\CV\AI-basketball-analysis-master\src\app_helper.py", line 19, in getVideoStream
datum, opWrapper = openpose_init()
File "D:\GritFeat\CV\AI-basketball-analysis-master\src\utils.py", line 47, in openpose_init
raise e
File "D:\GritFeat\CV\AI-basketball-analysis-master\src\utils.py", line 39, in openpose_init
import OpenPose.Release.pyopenpose as op
ModuleNotFoundError: No module named 'OpenPose.Release.pyopenpose'

@chonyy
Copy link
Owner

chonyy commented Sep 4, 2020

Hi, sorry for the late reply.

Do you have OpenPose properly installed on your device?
If you don't, this is a notebook that walks you through the whole process (include installing OpenPose) to get this project up and running.

Please tell me if the issue is solved!

@xugaoxiang
Copy link

Same problem, ubuntu 18.04.

@xugaoxiang
Copy link

I solve the problem. Compile the source (I use the release 1.7.0 and python 3.7) and then copy the compiled pyopenpose.cpython-37m-x86_64-linux-gnu.so to folder OpenPose/openpose

and change the code src/utils.py about Line 135 from

opWrapper.emplaceAndPop([datum])

to

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

Please access my openpose blog for details.

@chonyy
Copy link
Owner

chonyy commented May 13, 2021

Hi @xugaoxiang,

Thanks a lot for the information! I will update the instructions on my repo following your solution.
The compilation of OpenPose is always troublesome, I'm glad that you could figure out the solution.
It seems like there's no efficient way to share a project that included OpenPose, recompiling is always required.

@xugaoxiang
Copy link

This is a great project, thank you.

@or-toledano
Copy link

I solve the problem. Compile the source (I use the release 1.7.0 and python 3.7) and then copy the compiled pyopenpose.cpython-37m-x86_64-linux-gnu.so to folder OpenPose/openpose

and change the code src/utils.py about Line 135 from

opWrapper.emplaceAndPop([datum])

to

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

Please access my openpose blog for details.

Thanks!
Note that app_helper.py also requires:
detection, trace = detect_shot(img, trace, width, height, sess, image_tensor, boxes, scores, classes,
num_detections, previous, during_shooting, shot_result, fig, datum, opWrapper, shooting_pose, op)
(The addition of an op arg)
which can be obtained by
datum, opWrapper, op = openpose_init()
(need to alter openpose_init for this)

@chonyy chonyy added the good first issue Good for newcomers label Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants