3dpose_gan icon indicating copy to clipboard operation
3dpose_gan copied to clipboard

cv2.error when using demo.py

Open yenanfei opened this issue 6 years ago • 4 comments

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

yenanfei avatar Apr 21 '18 01:04 yenanfei

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

dotchang avatar Apr 23 '18 08:04 dotchang

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

yenanfei avatar Apr 24 '18 08:04 yenanfei

How did you solve the previous problem?

singhketan avatar Jul 05 '18 21:07 singhketan

@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

happymarco avatar Aug 25 '18 23:08 happymarco