matterport / Mask_RCNN

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

Trying to run a mask r cnn #2635

Open jppatricio23 opened 3 years ago

jppatricio23 commented 3 years ago

I'm trying to learn about mask R CNN, so I follow this tutorial - https://github.com/TannerGilbert/MaskRCNN-Object-Detection-and-Segmentation

I'm running python on windows using vscode.

I get this error message:

PS C:\Users\Utilizador\Desktop\Test_rig_rigid_model\Train1\Ok> & C:/Users/Utilizador/anaconda3/python.exe c:/Users/Utilizador/Downloads/dsdfsdf.py 2021-07-14 20:21:40.779515: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll

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_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 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

2021-07-14 20:21:43.692039: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library nvcuda.dll 2021-07-14 20:21:44.179105: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1050 computeCapability: 6.1 coreClock: 1.493GHz coreCount: 5 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 104.43GiB/s 2021-07-14 20:21:44.179781: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll 2021-07-14 20:21:44.187782: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll 2021-07-14 20:21:44.188123: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll 2021-07-14 20:21:44.195564: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll 2021-07-14 20:21:44.197512: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll 2021-07-14 20:21:44.201059: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusolver64_11.dll 2021-07-14 20:21:44.205431: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll 2021-07-14 20:21:44.206861: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found 2021-07-14 20:21:44.207314: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1766] 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... 2021-07-14 20:21:44.208371: 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: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-07-14 20:21:44.209671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix: 2021-07-14 20:21:44.209914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] WARNING:tensorflow:From C:\Users\Utilizador\anaconda3\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. Traceback (most recent call last): File "C:\Users\Utilizador\anaconda3\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 "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\profiler\trace.py", line 163, in wrapped return func(*args, **kwargs) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1566, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1536, in _autopacking_conversion_function return _autopacking_helper(v, dtype, name or "packed") File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1471, in _autopacking_helper constant_op.constant(elem, dtype=dtype, name=str(i))) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 265, in constant allow_broadcast=True) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 283, in _constant_impl allow_broadcast=allow_broadcast)) File "C:\Users\Utilizador\anaconda3\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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 536, in _apply_op_helper values, as_ref=input_arg.is_ref).dtype.name File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\profiler\trace.py", line 163, in wrapped return func(*args, **kwargs) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1566, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1536, in _autopacking_conversion_function return _autopacking_helper(v, dtype, name or "packed") File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1471, in _autopacking_helper constant_op.constant(elem, dtype=dtype, name=str(i))) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 265, in constant allow_broadcast=True) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 283, in _constant_impl allow_broadcast=allow_broadcast)) File "C:\Users\Utilizador\anaconda3\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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:/Users/Utilizador/Downloads/dsdfsdf.py", line 126, in model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config) File "C:\Users\Utilizador\anaconda3\lib\site-packages\mrcnn\model.py", line 1832, in init self.keras_model = self.build(mode=mode, config=config) File "C:\Users\Utilizador\anaconda3\lib\site-packages\mrcnn\model.py", line 2033, in build fc_layers_size=config.FPN_CLASSIF_FC_LAYERS_SIZE) File "C:\Users\Utilizador\anaconda3\lib\site-packages\mrcnn\model.py", line 954, in fpn_classifier_graph mrcnn_bbox = KL.Reshape((s[1], num_classes, 4), name="mrcnn_bbox")(x) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 970, in call input_list) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 1108, in _functional_construction_call inputs, input_masks, args, kwargs) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 840, in _keras_tensor_symbolic_call return self._infer_output_signature(inputs, args, kwargs, input_masks) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 880, in _infer_output_signature outputs = call_fn(inputs, *args, *kwargs) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\keras\layers\core.py", line 553, in call inputs, (array_ops.shape(inputs)[0],) + self.target_shape) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\util\dispatch.py", line 206, in wrapper return target(args, **kwargs) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 195, in reshape result = gen_array_ops.reshape(tensor, shape, name) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 8397, in reshape "Reshape", tensor=tensor, shape=shape, name=name) File "C:\Users\Utilizador\anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 540, in _apply_op_helper (input_name, err)) ValueError: Tried to convert 'shape' to a tensor and failed. Error: None values not supported. PS C:\Users\Utilizador\Desktop\Test_rig_rigid_model\Train1\Ok>

PythonSaubhagyam commented 2 years ago

@jppatricio23 Please tell me which version of TensorFlow and Keras are you used for training.