Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ct__sofia
Beginner
105 Views

Error Model Optimizer Customized Mask RCNN Inceptionv2

Hi I have train a customized Mask RCNN inception v2 on tensorflow just change default class to 1 and some paths in configuration file.I tried to optimize the frozen model to openvino using the code below:

python mo_tf.py --input_model=<modelpath>/IG_car_inceptionv2/frozen_inference_graph.pb --tensorflow_use_custom_operations_config=<installed openvino path>/deployment_tools/model_optimizer/extensions/front/tf/mask_rcnn_support_api_v1.13.json --tensorflow_object_detection_api_pipeline_config=<modelpath>/IG_car_inceptionv2/pipeline.config

 

Unfortunately got this error:

 

Model Optimizer version:        2019.1.1-83-g28dfbfd
[ WARNING ] Model Optimizer removes pre-processing block of the model which resizes image keeping aspect ratio. The Inference Engine does not support dynamic image size so the Intermediate Representation file is generated with the input image size of a fixed size.
Specify the "--input_shape" command line parameter to override the default shape which is equal to (800, 800).
The Preprocessor block has been removed. Only nodes performing mean value subtraction and scaling (if applicable) are kept.
The graph output nodes "num_detections", "detection_boxes", "detection_classes", "detection_scores" have been replaced with a single layer of type "Detection Output". Refer to IR catalogue in the documentation for information about this layer.
The predicted masks are produced by the "masks" layer for each bounding box generated with a "detection_output" layer.
 Refer to IR catalogue in the documentation for information about the DetectionOutput layer and Inference Engine documentation about output data interpretation.
The topology can be inferred using dedicated demo "mask_rcnn_demo".
[ ERROR ]  Shape is not defined for output 0 of "CropAndResize_1/Shape_1".
[ ERROR ]  Cannot infer shapes or values for node "CropAndResize_1/Shape_1".
[ ERROR ]  Not all output shapes were inferred or fully defined for node "CropAndResize_1/Shape_1".
 For more information please refer to Model Optimizer FAQ (<INSTALL_DIR>/deployment_tools/documentation/docs/MO_FAQ.html), question #40.
[ ERROR ]
[ ERROR ]  It can happen due to bug in custom shape infer function <function Shape.infer at 0x0000021827C1F488>.
[ ERROR ]  Or because the node inputs have incorrect values/shapes.
[ ERROR ]  Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
[ ERROR ]  Run Model Optimizer with --log_level=DEBUG for more information.
[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "CropAndResize_1/Shape_1" node.
 For more information please refer to Model Optimizer FAQ (<INSTALL_DIR>/deployment_tools/documentation/docs/MO_FAQ.html), question #38.

 

For your info I m using Tensorflow1.13.1 for the retraining

Hope someone can help.

Ive tried to refer to this forum, but still doesnt solve

0 Kudos
1 Reply
ct__sofia
Beginner
105 Views

Update: I have solved this issue. I notice there is error when I changed the class in configuration file mask_rcnn_inception_v2_coco.config to class=1. but when I change to class=2 mo_tf.py works. Perhaps intel can help to fix  the json file so that can be used only 1 class. Thanks.

Reply