ijkguo / mx-rcnn

Parallel Faster R-CNN implementation with MXNet.
Other
671 stars 290 forks source link

demo.py error: decide_slices assert len(data_shapes) > 0 #43

Closed nankezi closed 7 years ago

nankezi commented 7 years ago

Hello, when I run the command " python demo.py --image ../tj_tj_test/ --prefix model/finalnew --epoch 0 " Traceback (most recent call last): File "demo.py", line 143, in main() File "demo.py", line 122, in main predictor = get_net(symbol, args.prefix, args.epoch, ctx) File "demo.py", line 42, in get_net arg_params=arg_params, aux_params=aux_params) File "/media/D/mx-rcnn-master/rcnn/core/tester.py", line 21, in init self._mod.bind(provide_data, provide_label, for_training=False) File "/media/D/mx-rcnn-master/rcnn/core/module.py", line 137, in bind force_rebind=False, shared_module=None) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.7.0-py2.7.egg/mxnet/module/module.py", line 284, in bind grad_req=grad_req, input_types=input_types) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.7.0-py2.7.egg/mxnet/module/executor_group.py", line 187, in init self.label_layouts = self.decide_slices(label_shapes) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.7.0-py2.7.egg/mxnet/module/executor_group.py", line 201, in decide_slices assert len(data_shapes) > 0 AssertionError

ijkguo commented 7 years ago

In issue #35, is your problem with test_rpn in the alternate training resolved? I noticed that the error message is almost the same.

If not would you please try the same mxnet version as mine?

ijkguo commented 7 years ago

I notice that your parameter image is not a valid file name.

dakshvar22 commented 7 years ago

I got the same error. I issued this command - python demo.py --prefix final --epoch 0 --image dog.jpg --gpu 0 . The error that I got -

Traceback (most recent call last): File "demo.py", line 139, in main() File "demo.py", line 119, in main demo_net(predictor, args.image) File "demo.py", line 70, in demo_net scores, boxes, data_dict = im_detect(predictor, data_batch, data_names, im_scale) File "/home/tarun/daksh/mx-rcnn-master/rcnn/core/tester.py", line 106, in im_detect output = predictor.predict(data_batch) File "/home/tarun/daksh/mx-rcnn-master/rcnn/core/tester.py", line 25, in predict self._mod.forward(data_batch) File "/home/tarun/daksh/mx-rcnn-master/rcnn/core/module.py", line 187, in forward shared_module=self._curr_module) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/module/module.py", line 344, in bind grad_req=grad_req, input_types=input_types) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/module/executor_group.py", line 188, in init self.label_layouts = self.decide_slices(label_shapes) File "/usr/local/lib/python2.7/dist-packages/mxnet-0.9.1-py2.7-linux-x86_64.egg/mxnet/module/executor_group.py", line 203, in decide_slices assert len(data_shapes) > 0 AssertionError

ijkguo commented 7 years ago

nnvm require provide_label to be None instead of []. I have updated to resolve this issue.