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.
6450 Discussions

Mask R-CNN Inception ResNet V2 1024x1024 Conversion

Silviu1
Beginner
2,357 Views

Hi, I have trained and saved my own TF2 Mask RCNN model. I am trying to optimize the saved_model.pb for faster inference. I first try to convert the model into a frozen graph as states here https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Mode... but i get this error tensorflow.python.framework.errors_impl.InternalError: Tensorflow type 21 not convertible to numpy dtype. Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "StatefulPartitionedCall/map/TensorArrayV2_2" node. What can i do?

0 Kudos
9 Replies
Iffa_Intel
Moderator
2,343 Views

Hi,


If possible can you share/attach your model files here?.



Sincerely,

Iffa


0 Kudos
Silviu1
Beginner
2,326 Views

Hi,

The files are too big so i am attaching this link from wetransfer. You can find the saved model.pb as well as the last checkpoint that i have used to export this model. https://wetransfer.com/downloads/dc095bd9e7e55351c164d272720a54d020210722074104/ab9b6f08cde6d620cb142b32388a1fb320210722074133/11f3e7

 

Thank you for the response

0 Kudos
Iffa_Intel
Moderator
2,313 Views

Thanks & Noted.

We are investigating this and will get back to you as soon as possible



Sincerely,

Iffa


0 Kudos
Iffa_Intel
Moderator
2,301 Views

Hi,

 

I had tested your model and I get the same output.

I believe this is because you didn't freeze your model.

Please help to freeze your model before converting it.

You may refer here: https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#freeze-the-tensorflow-model

 

 

Sincerely,

Iffa

 

0 Kudos
Silviu1
Beginner
2,280 Views

Good morning,

1. The model is not frozen indeed.

2. This is the problem we already talking about https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#freeze-the-tensorflow-model  . The commnad to freeze the model according to this link is  python3 mo_tf.py --saved_model_dir <SAVED_MODEL_DIRECTORY> --output_dir <OUTPUT_MODEL_DIR> . 

3. The point is that following the exact steps in the guides provided you run from error to error and eventually can't convert the TF2 saved models.

4. What can we do to have this working as expected? I am happy to work together for a solution.

Best regards,

Silviu

0 Kudos
Iffa_Intel
Moderator
2,286 Views

In addition to that, your model might have some unsupported operation which this issue had been captured before.

For OpenVINO toolkit, this issue is potentially fixed in the 2022.1 version soon.


If you are willing to build the OpenVINO package from source, you could try to use your model with it, which the latest github release might already fix this issue.

This is the link to the official OpenVINO github: https://github.com/openvinotoolkit/openvino



Sincerely,

Iffa


0 Kudos
Silviu1
Beginner
2,280 Views

Hi, 

 

I will consider at this suggestion. 

Thank you !

 

Best regards,

Silviu

0 Kudos
Iffa_Intel
Moderator
2,270 Views

Splendid!


Shall I proceed with the closure of this thread then? if you don't have any other inquiries.



Sincerely

Iffa


0 Kudos
Iffa_Intel
Moderator
2,261 Views

Hi,


Intel will no longer monitor this thread since this issue has been resolved. If you need any additional information from Intel, please submit a new question. 


Sincerely,

Iffa


0 Kudos
Reply