Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Karmeo
Novice
561 Views

Unable to convert MaskRCNN matterport model to Neural Computer Stick

Jump to solution

Hello! I trained the maskrcnn model from this repository on my sample:
https://github.com/matterport/Mask_RCNN

During conversion to the platform, the following errors occurred:
Command: python mo_tf.py --input_shape = [1,800,1365,3] --input = image_tensor --tensorflow_custom_operations_config_update = C: \ Users \ Anna \ Downloads \ maskrcnn1 \ maskrcnn \ frozen_model \ mask_rcnn_support.json_tensorflow_flow_object_line = C: \ Users \ Anna \ Downloads \ maskrcnn1 \ maskrcnn \ frozen_model \ pipeline.config --input_model = C: \ Users \ Anna \ Downloads \ maskrcnn1 \ maskrcnn \ frozen_model \ mask_frozen_graph.pb --data_type FP32

Error:[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.user_data_repack.UserDataRepack'>): No node with name image_tensor.


If I enter the following in input_node: mrcnn_mask / BiasAdd
ERROR: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.input_cut.InputCut'>): Node mrcnn_mask/BiasAdd has more than 1 input and input shapes were provided. Try not to provide input shapes or specify input port with port:node notation, where port is an integer.

3 input(s) detected:
Name: input_image, type: float32, shape: (-1,-1,-1,3)
Name: input_image_meta, type: float32, shape: (-1,14)
Name: input_anchors, type: float32, shape: (-1,-1,4)
1 output(s) detected:
mrcnn_mask/Reshape_1

[UPDATE]

re-frozen the model in Netron. The input node in the model is named input_image, which is correct. Then I execute the following command:
python mo_tf.py --input_shape = [- 1, -1, -1.3] --input = input_image --input_model = C: \ Users \ Anna \ Downloads \ maskrcnn_sasha \ maskrcnn_sasha \ mask_frozen_graph.pb --data_type FP32
These parameters are input_shape and --input selected based on the output of the script summarize.py
3 input (s) detected:
Name: input_image, type: float32, shape: (-1, -1, -1,3)
Name: input_image_meta, type: float32, shape: (-1,19)
Name: input_anchors, type: float32, shape: (-1, -1,4)
1 output (s) detected: mrcnn_mask / Reshape_1
The following error goes to the command: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.input_cut.InputCut'>): --input parameter was provided. Other inputs are needed for output computation. Provide more inputs or choose another place to cut the net.
Configurations net:
BACKBONE                       resnet101
BACKBONE_STRIDES               [4, 8, 16, 32, 64]
BATCH_SIZE                     2
BBOX_STD_DEV                   [0.1 0.1 0.2 0.2]
COMPUTE_BACKBONE_SHAPE         None
DETECTION_MAX_INSTANCES        100
DETECTION_MIN_CONFIDENCE       0.9
DETECTION_NMS_THRESHOLD        0.3
FPN_CLASSIF_FC_LAYERS_SIZE     1024
GPU_COUNT                      1
GRADIENT_CLIP_NORM             5.0
IMAGES_PER_GPU                 2
IMAGE_CHANNEL_COUNT            3
IMAGE_MAX_DIM                  1024
IMAGE_META_SIZE                19
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                           object
NUM_CLASSES                    7
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                100
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
0 Kudos
1 Solution
David_C_Intel
Employee
536 Views

Hi Karmeo,

Thanks for reaching out. OpenVINO™ toolkit supports the Mask RCNN models from the Open Model Zoo (OMZ). The model you are using is not supported because the model architecture you are using seems to be different as the ones in OMZ. As the configuration file (.json) does not match the layer names, you can try to configure the json file to match each layer on your model, but we recommend you to retrain your network and dataset using one of the models on OMZ as the base model.

Best regards,

David C.



View solution in original post

2 Replies
David_C_Intel
Employee
537 Views

Hi Karmeo,

Thanks for reaching out. OpenVINO™ toolkit supports the Mask RCNN models from the Open Model Zoo (OMZ). The model you are using is not supported because the model architecture you are using seems to be different as the ones in OMZ. As the configuration file (.json) does not match the layer names, you can try to configure the json file to match each layer on your model, but we recommend you to retrain your network and dataset using one of the models on OMZ as the base model.

Best regards,

David C.



View solution in original post

David_C_Intel
Employee
511 Views

Hi Karmeo,

In case you need additional information, please post a new question as this thread will no longer be monitored.

Regards,

David C.


Reply