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.

Model optimizer error

Letty
Novice
1,731 Views

I tried to use the Model Optimizer to convert a Tensorflow model, but I received this error

 

[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ] Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'>)":
[ ERROR ] Traceback (most recent call last):
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 290, in apply_transform
for_graph_and_each_sub_graph_recursively(graph, replacer.find_and_replace_pattern)
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/middle/pattern_match.py", line 59, in for_graph_and_each_sub_graph_recursively
func(graph)
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/front/tf/replacement.py", line 48, in find_and_replace_pattern
self.transform_graph(graph, desc._replacement_desc['custom_attributes'])
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/extensions/front/tf/ObjectDetectionAPI.py", line 604, in transform_graph
assert start_nodes[0] in graph.nodes
AssertionError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/main.py", line 345, in main
ret_code = driver(argv)
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/main.py", line 309, in driver
ret_res = emit_ir(prepare_ir(argv), argv)
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/main.py", line 252, in prepare_ir
graph = unified_pipeline(argv)
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/pipeline/unified.py", line 29, in unified_pipeline
class_registration.ClassType.BACK_REPLACER
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 340, in apply_replacements
apply_replacements_list(graph, replacers_order)
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 330, in apply_replacements_list
num_transforms=len(replacers_order))
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/utils/logger.py", line 124, in wrapper
function(*args, **kwargs)
File "/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 318, in apply_transform
)) from err
Exception: Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'>)":

[ ERROR ] ---------------- END OF BUG REPORT --------------
[ ERROR ] -------------------------------------------------

 

Is there any way for me to solve this?

Labels (1)
0 Kudos
8 Replies
Zulkifli_Intel
Moderator
1,648 Views

Hello Letizia Mariotti,

 

Thank you for reaching out to us.

 

Please share with us the model, MO command you used to convert the model to IR format and any relevant information that will help us identify the issue.

 

Sincerely,

Zulkifli


0 Kudos
Letty
Novice
1,626 Views

Thank you for your reply.

This is the command I used

python3 /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo_tf.py --input_model inference_graph/frozen_inference_graph.pb -b 1 --output_dir faster_rcnn_inception_v2 --transformations_config /opt/intel/openvino_2021/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support_api_v2.0.json --tensorflow_object_detection_api_pipeline_config faster_rcnn_inception_v2_coco_gtsdb3.config

 

The files can be found at this link https://drive.google.com/open?id=1LRCSWIkX_i6ijScMfaxSte_5a_x9tjWF

 

When converting an SSD model I didn't face this error and everything worked fine

0 Kudos
Zulkifli_Intel
Moderator
1,610 Views

Hello Letizia Mariotti,

 

Thank you for sharing with us the information. Can I know where is the source of the model come from and is it TensorFlow 1 or 2? Also please provide us the link to the download page.

 

 

Sincerely,

Zulkifli

 

0 Kudos
Letty
Novice
1,577 Views

Thank you,

I downloaded the model from this page https://github.com/aarcosg/traffic-sign-detection

I tried to look for the information that you asked (version of Tensorflow and source) but I couldn't see it in the page.

 

0 Kudos
Zulkifli_Intel
Moderator
1,521 Views

Hello Letizia,


We are currently looking into this issue and will get back to you once we find the solution.


Sincerely,

Zulkifli


0 Kudos
Zulkifli_Intel
Moderator
1,437 Views

Hello Letizia Mariotti,

 

Sorry for the late response. Our developers are still working on this. Is there any chance you could use the faster_rcnn_inception_v2_coco model from Intel Open Model Zoo?

 

Sincerely,

Zulkifli 


0 Kudos
Zulkifli_Intel
Moderator
1,315 Views

Hello Letty,

 

It turned out that the error message is not a bug, but it is rather not a supported node as of now. Our developers currently working to include as a part of OpenVINO, but we cannot guarantee in which OpenVINO release it will be enabled.

 

We suggest you:

-       Using Intel Open Model Zoo model

-       We do have the same issue reported, and some workaround suggested here, which is to train the model with TF version 1.14.0.


Sincerely,

Zulkifli 


0 Kudos
Zulkifli_Intel
Moderator
1,290 Views

Hi Letty,


This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.


Sincerely,

Zulkifli


0 Kudos
Reply