ijkguo / mx-rcnn

Parallel Faster R-CNN implementation with MXNet.
Other
669 stars 292 forks source link

RuntimeError: rpn_bbox_pred_bias is not presented #48

Closed dakshvar22 closed 7 years ago

dakshvar22 commented 7 years ago

Hi,

I downloaded the vgg16 pretrained model using the script get_pretrained_model.sh . I wanted to test the repo on a dummy image, so I used this command - python demo.py --prefix vgg16 --epoch 0 --image dog.jpg --gpu 0

I get the following error -

Traceback (most recent call last): File "demo.py", line 139, in main() File "demo.py", line 118, in main predictor = get_net(symbol, args.prefix, args.epoch, ctx) File "demo.py", line 38, in get_net arg_params=arg_params, aux_params=aux_params) File "/home/tarun/daksh/mx-rcnn-master/rcnn/core/tester.py", line 22, in init self._mod.init_params(arg_params=arg_params, aux_params=aux_params) File "/home/tarun/daksh/mx-rcnn-master/rcnn/core/module.py", line 89, in init_params force_init=force_init) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/module/module.py", line 261, in init_params _impl(name, arr, arg_params) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/module/module.py", line 254, in _impl raise RuntimeError("%s is not presented" % name) RuntimeError: rpn_bbox_pred_bias is not presented

Any suggestions on what I am doing wrong?

ijkguo commented 7 years ago

Download final-0000.params

dakshvar22 commented 7 years ago

@precedenceguo thanks for the comment. In that case, can you look at https://github.com/precedenceguo/mx-rcnn/issues/47 I face this problem while downloading.

dakshvar22 commented 7 years ago

I downloaded the file as you said. I again issued the same command - python demo.py --prefix vgg16 --epoch 0 --image dog.jpg --gpu 0

Got this error -

[12:29:25] /home/tarun/daksh/mxnet/dmlc-core/include/dmlc/./logging.h:300: [12:29:24] src/ndarray/ndarray.cc:671: Check failed: fi->Read(data) Invalid NDArray file format

Stack trace returned 24 entries: [bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7fef98571a9c] [bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(_ZN5mxnet7NDArray4LoadEPN4dmlc6StreamEPSt6vectorIS0_SaIS0_EEPS4_ISsSaISsEE+0x207) [0x7fef98e31c17] [bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(MXNDArrayLoad+0x1b8) [0x7fef990d3e58] [bt] (3) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fefd6a37e40] [bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x2eb) [0x7fefd6a378ab] [bt] (5) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48f) [0x7fefaddcc3df] [bt] (6) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x11d82) [0x7fefaddd0d82] [bt] (7) python(PyObject_Call+0x43) [0x4b0cb3] [bt] (8) python(PyEval_EvalFrameEx+0x5faf) [0x4c9faf] [bt] (9) python(PyEval_EvalCodeEx+0x255) [0x4c2765] [bt] (10) python(PyEval_EvalFrameEx+0x68d1) [0x4ca8d1] [bt] (11) python(PyEval_EvalFrameEx+0x5d8f) [0x4c9d8f] [bt] (12) python(PyEval_EvalCodeEx+0x255) [0x4c2765] [bt] (13) python(PyEval_EvalFrameEx+0x6099) [0x4ca099] [bt] (14) python(PyEval_EvalFrameEx+0x5d8f) [0x4c9d8f] [bt] (15) python(PyEval_EvalFrameEx+0x5d8f) [0x4c9d8f] [bt] (16) python(PyEval_EvalCodeEx+0x255) [0x4c2765] [bt] (17) python(PyEval_EvalCode+0x19) [0x4c2509] [bt] (18) python() [0x4f1def] [bt] (19) python(PyRun_FileExFlags+0x82) [0x4ec652] [bt] (20) python(PyRun_SimpleFileExFlags+0x191) [0x4eae31] [bt] (21) python(Py_Main+0x68a) [0x49e14a] [bt] (22) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7ff0111a6830] [bt] (23) python(_start+0x29) [0x49d9d9]

Traceback (most recent call last): File "demo.py", line 139, in main() File "demo.py", line 118, in main predictor = get_net(symbol, args.prefix, args.epoch, ctx) File "demo.py", line 35, in get_net arg_params, aux_params = load_param(prefix, epoch, convert=True, ctx=ctx, process=True) File "/home/tarun/daksh/mx-rcnn-master/rcnn/utils/load_model.py", line 49, in load_param arg_params, aux_params = load_checkpoint(prefix, epoch) File "/home/tarun/daksh/mx-rcnn-master/rcnn/utils/load_model.py", line 15, in load_checkpoint save_dict = mx.nd.load('%s-%04d.params' % (prefix, epoch)) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/ndarray.py", line 1247, in load ctypes.byref(names))) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/base.py", line 75, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [12:29:24] src/ndarray/ndarray.cc:671: Check failed: fi->Read(data) Invalid NDArray file format

Stack trace returned 24 entries: [bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7fef98571a9c] [bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(_ZN5mxnet7NDArray4LoadEPN4dmlc6StreamEPSt6vectorIS0_SaIS0_EEPS4_ISsSaISsEE+0x207) [0x7fef98e31c17] [bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/libmxnet.so(MXNDArrayLoad+0x1b8) [0x7fef990d3e58] [bt] (3) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fefd6a37e40] [bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x2eb) [0x7fefd6a378ab] [bt] (5) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48f) [0x7fefaddcc3df] [bt] (6) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x11d82) [0x7fefaddd0d82] [bt] (7) python(PyObject_Call+0x43) [0x4b0cb3] [bt] (8) python(PyEval_EvalFrameEx+0x5faf) [0x4c9faf] [bt] (9) python(PyEval_EvalCodeEx+0x255) [0x4c2765] [bt] (10) python(PyEval_EvalFrameEx+0x68d1) [0x4ca8d1] [bt] (11) python(PyEval_EvalFrameEx+0x5d8f) [0x4c9d8f] [bt] (12) python(PyEval_EvalCodeEx+0x255) [0x4c2765] [bt] (13) python(PyEval_EvalFrameEx+0x6099) [0x4ca099] [bt] (14) python(PyEval_EvalFrameEx+0x5d8f) [0x4c9d8f] [bt] (15) python(PyEval_EvalFrameEx+0x5d8f) [0x4c9d8f] [bt] (16) python(PyEval_EvalCodeEx+0x255) [0x4c2765] [bt] (17) python(PyEval_EvalCode+0x19) [0x4c2509] [bt] (18) python() [0x4f1def] [bt] (19) python(PyRun_FileExFlags+0x82) [0x4ec652] [bt] (20) python(PyRun_SimpleFileExFlags+0x191) [0x4eae31] [bt] (21) python(Py_Main+0x68a) [0x49e14a] [bt] (22) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7ff0111a6830] [bt] (23) python(_start+0x29) [0x49d9d9]

ijkguo commented 7 years ago

Check failed: fi->Read(data) Invalid NDArray file format

This might suggest that the file is corrupted. Check sha1sum of final-0000.params: e94d0cc7724ed743e7702cb896d04f58de99d36d final-0000.params

dakshvar22 commented 7 years ago

@precedenceguo this is for the vgg model. Shouldn't I check the sha1sum of vgg16-0000.params?

ijkguo commented 7 years ago

vgg16 is imagenet classification while final is voc trained.

dakshvar22 commented 7 years ago

@precedenceguo okay. I checked the sha1sum of final-0000.params. It is the same as what you posted. Any other suggestions?

ijkguo commented 7 years ago

Can you try to load resnet-101-0000.params as in mxnet-notebooks predict with pretrained models tutorial?