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

cv2.error when using demo.py #3

Open
yenanfei opened this issue Apr 21, 2018 · 4 comments
Open

cv2.error when using demo.py #3

yenanfei opened this issue Apr 21, 2018 · 4 comments

Comments

@yenanfei
Copy link

When I run demo.py I met this error.Can you give me some advices to deal with it?
python3 bin/demo.py test.jpg --lift_model sample/gen_epoch_500.npz --model pose_iter_440000.caffemodel --proto2d openpose_pose_coco.prototxt

MODEL: generator, N_OUT: 17, N_UNIT: 1024
[mjpeg @ 0x55f4839aa660] mjpeg: invalid TIFF header in EXIF data
[mjpeg @ 0x55f4839aa220] mjpeg: invalid TIFF header in EXIF data
[ INFO:0] Initialize OpenCL runtime...
OpenCV Error: Assertion failed (output_slice.isContinuous() && output_slice.size == curr_output.size) in fuseLayers, file /io/opencv/modules/dnn/src/dnn.cpp, line 1430
Traceback (most recent call last):
File "bin/demo.py", line 201, in
main(args)
File "bin/demo.py", line 163, in main
points = OpenPose(args).predict(args, frame)
File "bin/demo.py", line 122, in predict
out = self.net.forward()
cv2.error: /io/opencv/modules/dnn/src/dnn.cpp:1430: error: (-215) output_slice.isContinuous() && output_slice.size == curr_output.size in function fuseLayers

@dotchang
Copy link

dotchang commented Apr 23, 2018

You have to re-build the openCV3.4 with python3.6 by yourself.
Please do not forget this.
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

for example, (sorry Japanese)
https://qiita.com/clerk67/items/ef0ccd94a966284b2e6e

@yenanfei
Copy link
Author

Thank you for your example.I have solved this problem.But there's another one.Do you know how to solve it?

MODEL: generator, N_OUT: 17, N_UNIT: 1024
[ INFO:0] Initialize OpenCL runtime...
Traceback (most recent call last):
File "/home/nanfei/anaconda3/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 52, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
TypeError: 'tuple' object cannot be interpreted as an integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "bin/demo.py", line 203, in
main(args)
File "bin/demo.py", line 178, in main
img = evaluation_util.create_projection_img(pose, np.pi * float(2) * i / split)
File "/home/nanfei/3dpose_gan/bin/evaluation_util.py", line 58, in create_projection_img
fake = np.reshape(fake, (y.shape[:3], -1))
File "/home/nanfei/anaconda3/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 257, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/nanfei/anaconda3/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 62, in _wrapfunc
return _wrapit(obj, method, *args, **kwds)
File "/home/nanfei/anaconda3/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 42, in _wrapit
result = getattr(asarray(obj), method)(*args, **kwds)
TypeError: 'tuple' object cannot be interpreted as an integer

@singhketan
Copy link

How did you solve the previous problem?

@happymarco
Copy link

happymarco commented Aug 25, 2018

@singhketan @yenanfei you can also install OpenCV 3.4 for Python 3.6 from a pip wheel: https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants