Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5864 Discussions

Mask R-CNN Inception ResNet V2 1024x1024 Conversion

Silviu1
Beginner
623 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
609 Views

Hi,


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



Sincerely,

Iffa


Silviu1
Beginner
592 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/ab9b6f08cde6d620cb14...

 

Thank you for the response

Iffa_Intel
Moderator
579 Views

Thanks & Noted.

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



Sincerely,

Iffa


Iffa_Intel
Moderator
567 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_Mode...

 

 

Sincerely,

Iffa

 

Silviu1
Beginner
546 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_Mode...  . 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

Iffa_Intel
Moderator
552 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


Silviu1
Beginner
546 Views

Hi, 

 

I will consider at this suggestion. 

Thank you !

 

Best regards,

Silviu

Iffa_Intel
Moderator
536 Views

Splendid!


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



Sincerely

Iffa


Iffa_Intel
Moderator
527 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


Reply