Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

Facing issue while converting mask_rcnn_inception_resnet_v2_atrous_coco tensorflow model to IR

Ajay_P_Intel
Employee
856 Views

Hi,

I am trying to convert the mask_rcnn_inception_resnet_v2_atrous_coco model to Intermediate representation but getting few errors.  I have downloaded the model using downloader.py file. 

 

Command used to convert the tensorflow model :

C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer>python mo.py --input_model "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\tools\model_downloader\public\mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\frozen_inference_graph.pb"

 

Model Optimizer arguments:
Common parameters:
        - Path to the Input Model:      C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\tools\model_downloader\public\mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\frozen_inference_graph.pb
        - Path for generated IR:        C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\.
        - IR output name:       frozen_inference_graph
        - Log level:    ERROR
        - Batch:        Not specified, inherited from the model
        - Input layers:         Not specified, inherited from the model
        - Output layers:        Not specified, inherited from the model
        - Input shapes:         Not specified, inherited from the model
        - Mean values:  Not specified
        - Scale values:         Not specified
        - Scale factor:         Not specified
        - Precision of IR:      FP32
        - Enable fusing:        True
        - Enable grouped convolutions fusing:   True
        - Move mean values to preprocess section:       False
        - Reverse input channels:       False
TensorFlow specific parameters:
        - Input model in text protobuf format:  False
        - Path to model dump for TensorBoard:   None
        - List of shared libraries with TensorFlow custom layers implementation:        None
        - Update the configuration file with input/output node names:   None
        - Use configuration file used to generate the model with Object Detection API:  None
        - Operations to offload:        None
        - Patterns to offload:  Scope_1/.*,Scope_2.*
        - Use the config file:  None
Model Optimizer version:        2019.3.0-408-gac8584cb7
[ ERROR ]  Shape [-1 -1 -1  3] is not fully defined for output 0 of "image_tensor". Use --input_shape with positive integers to override model input shapes.
[ ERROR ]  Cannot infer shapes or values for node "image_tensor".
[ ERROR ]  Not all output shapes were inferred or fully defined for node "image_tensor".
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #40.
[ ERROR ]
[ ERROR ]  It can happen due to bug in custom shape infer function <function Parameter.__init__.<locals>.<lambda> at 0x000002A507340318>.
[ 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 ]  Not all output shapes were inferred or fully defined for node "image_tensor".
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #40.
Stopped shape/value propagation at "image_tensor" node.
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.
Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Not all output shapes were inferred or fully defined for node "image_tensor".
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #40.
Stopped shape/value propagation at "image_tensor" node.
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.

0 Kudos
1 Solution
HemanthKum_G_Intel
856 Views

Hi Ajay,

You can use the following command for successful conversion of Mask RCNN model to Intel IR:-

python mo.py --input_model <path>mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\frozen_inference_graph.pb --tensorflow_use_custom_operations_config extensions\front\tf\mask_rcnn_support.json --tensorflow_object_detection_api_pipeline_config <path>mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\pipeline.config -o <path>mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28

View solution in original post

0 Kudos
2 Replies
HemanthKum_G_Intel
857 Views

Hi Ajay,

You can use the following command for successful conversion of Mask RCNN model to Intel IR:-

python mo.py --input_model <path>mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\frozen_inference_graph.pb --tensorflow_use_custom_operations_config extensions\front\tf\mask_rcnn_support.json --tensorflow_object_detection_api_pipeline_config <path>mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\pipeline.config -o <path>mask_rcnn_inception_resnet_v2_atrous_coco\mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28

0 Kudos
Ajay_P_Intel
Employee
856 Views

Thank You Hemanth. Its working !! 

0 Kudos
Reply