msracver / Deformable-ConvNets

Deformable Convolutional Networks
MIT License
4.04k stars 958 forks source link

Questions about running the Demo #66

Closed feitiandemiaomi closed 7 years ago

feitiandemiaomi commented 7 years ago

First,when I run the R-FCN demo following the instructions,there are one problem as follows: Traceback (most recent call last): File "./deeplab/demo.py", line 165, in main() File "./deeplab/demo.py", line 109, in main im = cv2.imread(cur_path + '/../demo/' + im_name, cv2.IMREAD_COLOR | cv2.IMREAD_IGNORE_ORIENTATION) AttributeError: 'module' object has no attribute 'IMREAD_IGNORE_ORIENTATION' My version of opencv is 2.4.13 ,I want to see the results so I remove the attribute"IMREAD_IGNORE_ORIENTATION",and it shows the error as follows: [16:19:58] /home/gpu4/Public/zs/mxnet/dmlc-core/include/dmlc/logging.h:300: [16:19:58] src/c_api/c_api_ndarray.cc:390: Operator _zeros cannot be run; requires at least one of FCompute, NDArrayFunction, FCreateOperator be registered

Stack trace returned 10 entries: [bt] (0) /home/gpu4/anaconda2/lib/python2.7/site-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x29) [0x7fb8209aea79] [bt] (1) /home/gpu4/anaconda2/lib/python2.7/site-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(MXImperativeInvoke+0x897) [0x7fb821170ae7] [bt] (2) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call_unix64+0x4c) [0x7fb7f3acf31c] [bt] (3) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call+0x1f5) [0x7fb7f3acea75] [bt] (4) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(_ctypes_callproc+0x3e6) [0x7fb7f3ac6126] [bt] (5) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(+0x9ce3) [0x7fb7f3abdce3] [bt] (6) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x7fb85849cdc3] [bt] (7) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6a67) [0x7fb85854e6c7] [bt] (8) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x89e) [0x7fb8585511ce] [bt] (9) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x8596) [0x7fb8585501f6]

Traceback (most recent call last): File "./rfcn/demo.py", line 129, in main() File "./rfcn/demo.py", line 89, in main arg_params=arg_params, aux_params=aux_params) File "/home/gpu4/Public/zs/Deformable-ConvNets/rfcn/core/tester.py", line 29, in init self._mod.bind(provide_data, provide_label, for_training=False) File "/home/gpu4/Public/zs/Deformable-ConvNets/rfcn/core/module.py", line 839, in bind for_training, inputs_need_grad, force_rebind=False, shared_module=None) File "/home/gpu4/Public/zs/Deformable-ConvNets/rfcn/core/module.py", line 396, in bind state_names=self._state_names) File "/home/gpu4/Public/zs/Deformable-ConvNets/rfcn/core/DataParallelExecutorGroup.py", line 186, in init self.bind_exec(data_shapes, label_shapes, shared_group) File "/home/gpu4/Public/zs/Deformable-ConvNets/rfcn/core/DataParallelExecutorGroup.py", line 272, in bind_exec shared_group)) File "/home/gpu4/Public/zs/Deformable-ConvNets/rfcn/core/DataParallelExecutorGroup.py", line 545, in _bind_ith_exec context, self.logger) File "/home/gpu4/Public/zs/Deformable-ConvNets/rfcn/core/DataParallelExecutorGroup.py", line 523, in _get_or_reshape arg_arr = nd.zeros(arg_shape, context, dtype=arg_type) File "/home/gpu4/anaconda2/lib/python2.7/site-packages/mxnet-0.9.5-py2.7.egg/mxnet/ndarray.py", line 946, in zeros return _internal._zeros(shape=shape, ctx=ctx, dtype=dtype) File "/home/gpu4/anaconda2/lib/python2.7/site-packages/mxnet-0.9.5-py2.7.egg/mxnet/_ctypes/ndarray.py", line 164, in generic_ndarray_function c_array(ctypes.c_char_p, [c_str(val) for val in vals]))) File "/home/gpu4/anaconda2/lib/python2.7/site-packages/mxnet-0.9.5-py2.7.egg/mxnet/base.py", line 78, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [16:19:58] src/c_api/c_api_ndarray.cc:390: Operator _zeros cannot be run; requires at least one of FCompute, NDArrayFunction, FCreateOperator be registered

Stack trace returned 10 entries: [bt] (0) /home/gpu4/anaconda2/lib/python2.7/site-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x29) [0x7fb8209aea79] [bt] (1) /home/gpu4/anaconda2/lib/python2.7/site-packages/mxnet-0.9.5-py2.7.egg/mxnet/libmxnet.so(MXImperativeInvoke+0x897) [0x7fb821170ae7] [bt] (2) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call_unix64+0x4c) [0x7fb7f3acf31c] [bt] (3) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(ffi_call+0x1f5) [0x7fb7f3acea75] [bt] (4) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(_ctypes_callproc+0x3e6) [0x7fb7f3ac6126] [bt] (5) /home/gpu4/anaconda2/lib/python2.7/lib-dynload/_ctypes.so(+0x9ce3) [0x7fb7f3abdce3] [bt] (6) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x7fb85849cdc3] [bt] (7) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6a67) [0x7fb85854e6c7] [bt] (8) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x89e) [0x7fb8585511ce] [bt] (9) /home/gpu4/anaconda2/bin/../lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x8596) [0x7fb8585501f6]

I do not know why the error happened and could you tell me how to resolve the question.

Thank you!

liyi14 commented 7 years ago

Maybe you can refer to #43 .

feitiandemiaomi commented 7 years ago

Thanks for your reply,I will try again

feitiandemiaomi commented 7 years ago

Thanks, success!!