- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looking for the mo command to solv this error.
I have an older tf1 model was working fine for a few years. But it's not working now.
The command is: python mo_tf.py --input_model C:\t\y11\output_inference_graph.pb\frozen_inference_graph.pb --tensorflow_object_detection_api_pipeline_config C:\t\y11\output_inference_graph.pb\pipeline.config --tensorflow_use_custom_operations_config "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.087\deployment_tools\model_optimizer\extensions\front\tf\ssd_v2_support.json" --input_shape=[1,300,300,3] --data_type FP16
I have tried many difference command for openvino_2022.1.0.643 without sucess.
Do you have an reconmented mo command to try ?
Enviroment:
Windows 10,
Python 3.7.8
openvino_2022.1
Also, I like to upgrad the model with TF2, does openvido support TF2 with RESNET50 model ? any example that I can follow?
Thanks in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lee_Terry,
Thanks for reaching out.
For your information OpenVINO 2022.1 is no longer supported. You may download the supported version of OpenVINO by following the guide from Install OpenVINO page. Currently supported versions are:
- 2023.1 (development)
- 2022.3 (LTS)
- 2021.4 (LTS)
You may refer Converting a TensorFlow Model page to convert a model from a TensorFlow format to the OpenVINO IR format using Model Optimizer.
On another note, you may refer to this Migrate from TensorFlow 1.x to TensorFlow 2 (*This is an external link and is not maintained by Intel) to migrate your model into TensorFlow 2.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aznie,
Thanks for the respond.
I went though the document and tried all the cominations that I can think of without success. Would you take a look at the command I used for the older version and provide the MO command that I could use to try out?
Thanks,
Terry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lee_Terry,
What error did you get when running the command? Please share the error for us to further understand this. You may try the command below and see if it is working:
python mo_tf.py --saved_model_dir <model_directory>\saved_model
*saved_model_dir must provide a path to the SavedModel directory.
If the issue persists, you may share your model files in this ticket and we will do further checking.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aznie,
Thanks for the quick responds.
I follow the intruction to install a new enviroment with 2022.3 (LTS) an tf. The command time shows the follow message below. The network that I would like to convert is attached in the zip file. Please see if you could do the conversion.
Thanks,
Terry
(openvino_env) C:\vc\net\openvino_env\Lib\site-packages\openvino>python C:\vc\net\openvino_env\Lib\site-packages\openvino\tools\mo\mo_tf.py --saved_model_dir C:\t\y11\output_inference_graph_16.pb\saved_model --use_new_frontend
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ] Check 'TYPE_MAP().count(tf_type)' failed at C:\Jenkins\workspace\private-ci\ie\build-windows-vs2019\b\repos\openvino\src\frontends\tensorflow\src\decoder_proto.cpp:191:
FrontEnd API failed with GeneralFailure: :
Encountered unknown element type DT_STRING on an empty tensor_proto
[ ERROR ] Traceback (most recent call last):
File "C:\vc\net\openvino_env\lib\site-packages\openvino\tools\mo\main.py", line 50, in main
ngraph_function = convert_model(**argv)
File "C:\vc\net\openvino_env\lib\site-packages\openvino\tools\mo\convert.py", line 47, in convert_model
return _convert(**args)
File "C:\vc\net\openvino_env\lib\site-packages\openvino\tools\mo\convert_impl.py", line 942, in _convert
raise e.with_traceback(None)
openvino._pyopenvino.GeneralFailure: Check 'TYPE_MAP().count(tf_type)' failed at C:\Jenkins\workspace\private-ci\ie\build-windows-vs2019\b\repos\openvino\src\frontends\tensorflow\src\decoder_proto.cpp:191:
FrontEnd API failed with GeneralFailure: :
Encountered unknown element type DT_STRING on an empty tensor_proto
[ ERROR ] ---------------- END OF BUG REPORT --------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lee_Terry,
I've tested your model both with 2022.3 and 2023.1 versions and observed a difference error between these two versions.
The error is due to the legacy frontend API in your model. You could try to run the Model Optimizer by specifying the following options: --input, --output, --input_shape, --reverse_input_channels and see if the conversion is successful.
On another note, I would suggest you to Migrate from TensorFlow 1.x to TensorFlow 2 and
Refer Model Optimizer Usage in converting models using Model Optimizer.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aznie,
Thanks, I like to convert it to tf2. But, runing into some issues in the process.
Could you let me know if mobilenetv2 supported by openvino?
If I have the TF dataset, do you have a sample that I can follow to customer train the model and convert to openvino.
Do you have a list of object detection models(tf model that can be custom train) the can convert to openvino ?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lee_Terry,
Mobilenet-v2 is supported with OpenVINO and it is an image classification model. You may Download the Model and Convert it into OpenVINO Intermediate Representation (IR) file with omz_downloader and omz_converter.
Here is Object Detection Python Demo and these are the Supported Models for object detection. You may retrain the model using OpenVINO Training Extensions.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lee_Terry,
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.
Regards,
Aznie

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page