msracver / Deformable-ConvNets

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

Deeplab demo errors #84

Open ArsenLuca opened 7 years ago

ArsenLuca commented 7 years ago

When I run :python experiments/deeplab/deeplab_train_test.py --cfg experiments/deeplab/cfgs/deeplab_resnet_v1_101_voc12_segmentation_base.yaml

It failed with information:

Called with argument: Namespace(cfg='experiments/deeplab/cfgs/deeplab_resnet_v1_101_voc12_segmentation_base.yaml', frequent=10) {'CLASS_AGNOSTIC': True, 'MXNET_VERSION': 'mxnet', 'SCALES': [(360, 600)], 'TEST': {'BATCH_IMAGES': 1, 'test_epoch': 12}, 'TRAIN': {'BATCH_IMAGES': 1, 'CROP_HEIGHT': 768, 'CROP_WIDTH': 1024, 'ENABLE_CROP': False, 'ENABLE_OHEM': False, 'FLIP': True, 'RESUME': False, 'SHUFFLE': True, 'begin_epoch': 0, 'end_epoch': 12, 'lr': 0.0005, 'lr_step': '8', 'model_prefix': 'deeplab_resnet_v1_101_voc12_segmentation_base', 'momentum': 0.9, 'warmup': False, 'warmup_lr': 5e-05, 'warmup_step': 1000, 'wd': 0.0005}, 'dataset': {'NUM_CLASSES': 21, 'annotation_prefix': 'gtFine', 'dataset': 'PascalVOC', 'dataset_path': './data/VOCdevkit2012/', 'image_set': '2012_train_seg', 'root_path': './data/', 'test_image_set': '2012_val_seg'}, 'default': {'frequent': 10, 'kvstore': 'device'}, 'gpus': '0', 'network': {'FIXED_PARAMS': ['conv1', 'bn_conv1', 'res2', 'bn2', 'gamma', 'beta'], 'FIXED_PARAMS_SHARED': ['conv1', 'bn_conv1', 'res2', 'bn2', 'res3', 'bn3', 'res4', 'bn4', 'gamma', 'beta'], 'IMAGE_STRIDE': 0, 'PIXEL_MEANS': array([ 103.06, 115.9 , 123.15]), 'pretrained': './model/pretrained_model/resnet_v1_101', 'pretrained_epoch': 0}, 'output_path': './output/voc12', 'symbol': 'resnet_v1_101_deeplab'} num_images 10582 voc_2012_train_seg gt segdb loaded from ./data/cache/voc_2012_train_seg_gt_segdb.pkl append flipped images to segdb providing maximum shape [('data', (1, 3, 768, 1024))] [('label', [(1L, 21L, 768L, 1024L)])] {'data': (1L, 3L, 360L, 541L), 'label': (1L, 1L, 360L, 541L)} ./model/pretrained_model/resnet_v1_101 lr 0.0005 lr_epoch_diff [8.0] lr_iters [169312] Traceback (most recent call last): File "experiments/deeplab/deeplab_train_test.py", line 21, in train.main() File "experiments/deeplab/../../deeplab/train.py", line 159, in main config.TRAIN.begin_epoch, config.TRAIN.end_epoch, config.TRAIN.lr, config.TRAIN.lr_step) File "experiments/deeplab/../../deeplab/train.py", line 153, in train_net arg_params=arg_params, aux_params=aux_params, begin_epoch=begin_epoch, num_epoch=end_epoch) File "experiments/deeplab/../../deeplab/core/module.py", line 948, in fit for_training=True, force_rebind=force_rebind) File "experiments/deeplab/../../deeplab/core/module.py", line 841, in bind for_training, inputs_need_grad, force_rebind=False, shared_module=None) File "experiments/deeplab/../../deeplab/core/module.py", line 396, in bind state_names=self._state_names) File "experiments/deeplab/../../deeplab/core/DataParallelExecutorGroup.py", line 183, in init self.bind_exec(data_shapes, label_shapes, shared_group) File "experiments/deeplab/../../deeplab/core/DataParallelExecutorGroup.py", line 283, in bind_exec shared_group)) File "experiments/deeplab/../../deeplab/core/DataParallelExecutorGroup.py", line 500, in _bind_ith_exec argshapes, , aux_shapes = self.symbol.infer_shape(*input_shapes) File "/home/zhangyasen/anaconda2/lib/python2.7/site-packages/mxnet-0.11.1-py2.7.egg/mxnet/symbol/symbol.py", line 962, in infer_shape res = self._infer_shape_impl(False, args, **kwargs) File "/home/zhangyasen/anaconda2/lib/python2.7/site-packages/mxnet-0.11.1-py2.7.egg/mxnet/symbol/symbol.py", line 1058, in _infer_shape_impl "but '%s' is %s." % (k, type(v))) TypeError: Arguments need to be shapes (tuple), but 'label' is <type 'list'>

It seems some grammar errors exist in codes. How can I do?

chowkamlee81 commented 7 years ago

Problem with version...You have to use the version suggest in website i.e 0.9.5 rather than 0.11.1

wenqingchu commented 6 years ago

@chowkamlee81 pip install mxnet with 0.9.5, it still has error "AttributeError: 'module' object has no attribute 'DeformableConvolution'". How do you fix it?

ktr-hubrt commented 6 years ago

Dear wenqingchu: have you solved the problem?