matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.39k stars 11.66k forks source link

None values not supported. #2326

Open rttariverdi67 opened 3 years ago

rttariverdi67 commented 3 years ago

I'm trying to run demo.py but got this error: ValueError: Tried to convert 'shape' to a tensor and failed. Error: None values not supported.

my configurations are like below, but I can't figure it out how to solve this. can anyone help me?

thanks

2020-08-21 01:10:32.698751: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:32.698776: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

Configurations: BACKBONE resnet101 BACKBONE_STRIDES [4, 8, 16, 32, 64] BATCH_SIZE 1 BBOX_STD_DEV [0.1 0.1 0.2 0.2] COMPUTE_BACKBONE_SHAPE None DETECTION_MAX_INSTANCES 100 DETECTION_MIN_CONFIDENCE 0.7 DETECTION_NMS_THRESHOLD 0.3 FPN_CLASSIF_FC_LAYERS_SIZE 1024 GPU_COUNT 1 GRADIENT_CLIP_NORM 5.0 IMAGES_PER_GPU 1 IMAGE_CHANNEL_COUNT 3 IMAGE_MAX_DIM 1024 IMAGE_META_SIZE 93 IMAGE_MIN_DIM 800 IMAGE_MIN_SCALE 0 IMAGE_RESIZE_MODE square IMAGE_SHAPE [1024 1024 3] LEARNING_MOMENTUM 0.9 LEARNING_RATE 0.001 LOSS_WEIGHTS {'rpn_class_loss': 1.0, 'rpn_bbox_loss': 1.0, 'mrcnn_class_loss': 1.0, 'mrcnn_bbox_loss': 1.0, 'mrcnn_mask_loss': 1.0} MASK_POOL_SIZE 14 MASK_SHAPE [28, 28] MAX_GT_INSTANCES 100 MEAN_PIXEL [123.7 116.8 103.9] MINI_MASK_SHAPE (56, 56) NAME coco NUM_CLASSES 81 POOL_SIZE 7 POST_NMS_ROIS_INFERENCE 1000 POST_NMS_ROIS_TRAINING 2000 PRE_NMS_LIMIT 6000 ROI_POSITIVE_RATIO 0.33 RPN_ANCHOR_RATIOS [0.5, 1, 2] RPN_ANCHOR_SCALES (32, 64, 128, 256, 512) RPN_ANCHOR_STRIDE 1 RPN_BBOX_STD_DEV [0.1 0.1 0.2 0.2] RPN_NMS_THRESHOLD 0.7 RPN_TRAIN_ANCHORS_PER_IMAGE 256 STEPS_PER_EPOCH 1000 TOP_DOWN_PYRAMID_SIZE 256 TRAIN_BN False TRAIN_ROIS_PER_IMAGE 200 USE_MINI_MASK True USE_RPN_ROIS True VALIDATION_STEPS 50 WEIGHT_DECAY 0.0001

2020-08-21 01:10:33.890387: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1 2020-08-21 01:10:33.916158: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:982] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-08-21 01:10:33.916712: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: pciBusID: 0000:01:00.0 name: Quadro M1200 computeCapability: 5.0 coreClock: 1.148GHz coreCount: 5 deviceMemorySize: 3.95GiB deviceMemoryBandwidth: 74.65GiB/s 2020-08-21 01:10:33.916865: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:33.916981: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:33.917107: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:33.917230: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:33.917354: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:33.917483: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcusparse.so.10'; dlerror: libcusparse.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:33.917593: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/melodic/lib 2020-08-21 01:10:33.917603: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1753] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2020-08-21 01:10:33.917811: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-08-21 01:10:33.923356: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2799925000 Hz 2020-08-21 01:10:33.923655: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5572b1fff640 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-08-21 01:10:33.923674: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-08-21 01:10:33.924852: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-08-21 01:10:33.924864: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]
Traceback (most recent call last): File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/op_def_library.py", line 465, in _apply_op_helper values = ops.convert_to_tensor( File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 1499, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 1502, in _autopacking_conversion_function return _autopacking_helper(v, dtype, name or "packed") File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 1437, in _autopacking_helper constant_op.constant(elem, dtype=dtype, name=str(i))) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py", line 263, in constant return _constant_impl(value, dtype, shape, name, verify_shape=False, File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py", line 280, in _constant_impl tensor_util.make_tensor_proto( File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/tensor_util.py", line 444, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/op_def_library.py", line 483, in _apply_op_helper observed = ops.convert_to_tensor( File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 1499, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 1502, in _autopacking_conversion_function return _autopacking_helper(v, dtype, name or "packed") File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 1437, in _autopacking_helper constant_op.constant(elem, dtype=dtype, name=str(i))) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py", line 263, in constant return _constant_impl(value, dtype, shape, name, verify_shape=False, File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py", line 280, in _constant_impl tensor_util.make_tensor_proto( File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/tensor_util.py", line 444, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "demo.py", line 74, in model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config) File "/home/rahim/Desktop/mask-rcnn/Mask_RCNN-master/mrcnn/model.py", line 1837, in init self.keras_model = self.build(mode=mode, config=config) File "/home/rahim/Desktop/mask-rcnn/Mask_RCNN-master/mrcnn/model.py", line 2035, in build fpn_classifier_graph(rpn_rois, mrcnn_feature_maps, input_image_meta, File "/home/rahim/Desktop/mask-rcnn/Mask_RCNN-master/mrcnn/model.py", line 951, in fpn_classifier_graph mrcnn_bbox = KL.Reshape((s[1], num_classes, 4), name="mrcnn_bbox")(x) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 925, in call return self._functional_construction_call(inputs, args, kwargs, File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1117, in _functional_construction_call outputs = call_fn(cast_inputs, *args, *kwargs) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/keras/layers/core.py", line 539, in call result = array_ops.reshape( File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper return target(args, **kwargs) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 195, in reshape result = gen_array_ops.reshape(tensor, shape, name) File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/ops/gen_arrayops.py", line 8233, in reshape , _, _op, _outputs = _op_def_library._apply_op_helper( File "/home/rahim/anaconda3/envs/rahim/lib/python3.8/site-packages/tensorflow/python/framework/op_def_library.py", line 486, in _apply_op_helper raise ValueError( ValueError: Tried to convert 'shape' to a tensor and failed. Error: None values not supported.

sruthikeerthi18 commented 3 years ago

@rttariverdi67 Hey, were you able to find a fix for this issue?

bonjour-npy commented 2 years ago

@rttariverdi67 @sruthikeerthi18 I also ran into this issue and I don't know how to fix it, it's so Unbelievable

rttariverdi67 commented 2 years ago

@npy-sjh check that the image in it's directory which you're trying to load, is exist. for me it was the problem.

bonjour-npy commented 2 years ago

@rttariverdi67 Nice to receive your message, but I'm afraid that's not my problem. I just run the demo.ipynb and it shows this not supported issue, I even didn't start to load the image

bonjour-npy commented 2 years ago

@rttariverdi67 I even don't know where is the NONE type data which caused this issue

bonjour-npy commented 2 years ago

@rttariverdi67 It just shows me this!!!!

Traceback (most recent call last): File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 498, in _apply_op_helper values, name=input_arg.name, as_ref=input_arg.is_ref) File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\profiler\trace.py", line 163, in wrapped return func(*args, **kwargs) File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1540, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1525, in _autopacking_conversion_function return _autopacking_helper(v, dtype, name or "packed") File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1460, in _autopacking_helper constant_op.constant(elem, dtype=dtype, name=str(i))) File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 265, in constant allow_broadcast=True) File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 283, in _constant_impl allow_broadcast=allow_broadcast)) File "D:\Conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 445, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported.

bonjour-npy commented 2 years ago

@rttariverdi67 Could you help me with that, Please?

bonjour-npy commented 2 years ago

@rttariverdi67 I checked and changed the right image path just now, but it was still wrong