Open AidaSilva opened 3 years ago
This isn't a repo for MaskRCNN.
This is the demo from MaskRCNN and I keep getting the same error ValueError: None values not supported.
Hi Jordan Pierce,
I am using MaskRCNN repo from Matterpoart on github, this is the error I got from running the demo.
I would appreciate if you have some suggestions on how to go about it.
Thanks, Aida
On Tue, Jun 22, 2021 at 4:57 PM Jordan Pierce @.***> wrote:
This isn't a repo for MaskRCNN.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qubvel/segmentation_models/issues/481#issuecomment-866328093, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATJZQJ4BNSLGF7AKXUHSVJLTUD2LNANCNFSM47ATBWLA .
--
Aida da Silva
Student at WVU Major Civil Engineering @.***
Hi @AidaSilva, yes I see that this is code for Matterport's MaskRCNN implementation in Keras, however this repository is qubvel's semantic segmentation repository. It might be more helpful for you to post your issues in Matterport's repo instead.
But since we're already here: looking at the error it seems that something is unutilized and is equal to None
when it should be something else. I'd recommend checking your config
and MODEL_DIR
variables first. It's also possible that you're using different versions of Tensorflow, Keras, and other dependencies that Matterport's code relies on. Can you confirm you're using the correct requirements?
Hi Jordan,
Thank you for writing back to me.
I am using the newest version of tf and Keras. I am able to run the demo. But I am having some issues with configuration as I am trying to train my own data set. I was wondering if you could help me. Here is the error message:
TypeError Traceback (most recent call
last)
KL.Lambda(lambda x: norm_boxes_graph(-> 1909 x, K.shape(input_image)[1:3]))(input_gt_boxes) 1910 # 3. GT Masks (zero padded) 1911 # [batch, height, width, MAX_GT_INSTANCES] c:\users\owner\anaconda3\envs\maskrcnn\lib\site-packages\keras\engine\base_layer.py in call(self, *args, **kwargs) 944 if _in_functional_construction_mode(self, inputs, args, kwargs, input_list): 945 return self._functional_construction_call(inputs, args, kwargs,--> 946 input_list) 947 948
Layer.call
stack.c:\users\owner\anaconda3\envs\maskrcnn\lib\site-packages\keras\engine\base_layer.py
in _functional_construction_call(self, inputs, args, kwargs,
input_list) 1082 # Check input assumptions set after layer
building, e.g. input shape. 1083 outputs =
self._keras_tensor_symbolic_call(-> 1084 inputs,
input_masks, args, kwargs) 1085 1086 if outputs is None:
c:\users\owner\anaconda3\envs\maskrcnn\lib\site-packages\keras\engine\base_layer.py
in _keras_tensor_symbolic_call(self, inputs, input_masks, args,
kwargs) 814 return
tf.nest.map_structure(keras_tensor.KerasTensor, output_signature)
815 else:--> 816 return self._infer_output_signature(inputs,
args, kwargs, input_masks) 817 818 def
_infer_output_signature(self, inputs, args, kwargs, input_masks):
c:\users\owner\anaconda3\envs\maskrcnn\lib\site-packages\keras\engine\base_layer.py
in _infer_output_signature(self, inputs, args, kwargs, input_masks)
860 build_graph=False) 861
outputs = tf.nest.map_structure(--> 862
keras_tensor.keras_tensor_from_tensor, outputs) 863 864 if
hasattr(self, '_set_inputs') and not self.inputs:
c:\users\owner\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\util\nest.py
in map_structure(func, *structure, *kwargs) 865 866 return
pack_sequence_as(--> 867 structure[0], [func(x) for x in
entries], 868 expand_composites=expand_composites) 869
c:\users\owner\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\util\nest.py
in
On Wed, Jun 23, 2021 at 10:16 AM Jordan Pierce @.***> wrote:
Hi @AidaSilva https://github.com/AidaSilva, yes I see that this is code for Matterport's MaskRCNN implementation in Keras, however this repository is qubvel's semantic segmentation repository. It might be more helpful for you to post your issues in Matterport's repo instead.
But since we're already here: looking at the error it seems that something is unutilized and is equal to None when it should be something else. I'd recommend checking your config and MODEL_DIR variables first. It's also possible that you're using different versions of Tensorflow, Keras, and other dependencies that Matterport's code relies on. Can you confirm you're using the correct requirements https://github.com/matterport/Mask_RCNN/blob/master/requirements.txt?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qubvel/segmentation_models/issues/481#issuecomment-866875141, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATJZQJ7Q264KYQD4UVKE52TTUHUFFANCNFSM47ATBWLA .
--
Aida da Silva
Student at WVU Major Civil Engineering @.***
I user python 11 tf, keras 2.12 It's the same: /content/drive/MyDrive/DoAn/Teeth/Mask-R-CNN-using-Tensorflow2-main/mrcnn/model.py in if_body() 40 nonlocal keep 41 conf_keep = ag.converted_call(ag.ld(tf).where, (ag.ld(class_scores) >= ag.ld(config).DETECTION_MIN_CONFIDENCE,), None, fscope)[:, 0] ---> 42 keep = ag.converted_call(ag__.ld(tf).sparse.to_dense, (ag.converted_call(ag.ld(tf).expand_dims, (ag.ld(keep), 0), None, fscope), ag.converted_call(ag.ld(tf).expand_dims, (ag.ld(conf_keep), 0), None, fscope)), None, fscope) 43 keep = ag__.converted_call(ag.ld(tf).sparse.to_dense, (ag__.ld(keep),), None, fscope)[0] 44
TypeError: Exception encountered when calling layer "mrcnn_detection" (type DetectionLayer).
in user code:
File "/content/drive/MyDrive/DoAn/Teeth/Mask-R-CNN-using-Tensorflow2-main/mrcnn/model.py", line 812, in call *
detections_batch = utils.batch_slice(
File "/content/drive/MyDrive/DoAn/Teeth/Mask-R-CNN-using-Tensorflow2-main/mrcnn/utils.py", line 820, in batch_slice *
output_slice = graph_fn(*inputs_slice)
File "/content/drive/MyDrive/DoAn/Teeth/Mask-R-CNN-using-Tensorflow2-main/mrcnn/model.py", line 721, in refine_detections_graph *
keep = tf.sparse.to_dense(tf.expand_dims(keep, 0),
TypeError: Input must be a SparseTensor.
Call arguments received by layer "mrcnn_detection" (type DetectionLayer): • inputs=['tf.Tensor(shape=(1, None, 4), dtype=float32)', 'tf.Tensor(shape=(1, None, 3), dtype=float32)', 'tf.Tensor(shape=(1, None, 3, 4), dtype=float32)', 'tf.Tensor(shape=(None, 15), dtype=float32)']
Did you fix it yet?
WARNING:tensorflow:From c:\users\owner\anaconda3\envs\maskrcnn\lib\site-packages\tensorflow\python\ops\array_ops.py:5049: calling gather (from tensorflow.python.ops.array_ops) with validate_indices is deprecated and will be removed in a future version. Instructions for updating: The
validate_indices
argument has no effect. Indices are always validated on CPU and never validated on GPU.ValueError Traceback (most recent call last)