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

Error in converting tensorflow model to IR

TarunM
Beginner
653 Views

The model is also attached.

Below is the error:-

C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\model_optimizer>python mo_tf.py --saved_model_dir "C:\Users\tarunmis\Downloads\workspace\exported-models\my_model\saved_model" --output_dir "C:\Users\tarunmis\Downloads\workspace" --input_shape (1,512,512,3)
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: None
- Path for generated IR: C:\Users\tarunmis\Downloads\workspace
- IR output name: saved_model
- 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: (1,512,512,3)
- 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
- Use the config file: None
Model Optimizer version:
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.load.tf.loader.TFLoader'>): Unexpected exception happened during extracting attributes for node Const_30.
Original exception message: 'ascii' codec can't decode byte 0xfd in position 183: ordinal not in range(128)

0 Kudos
4 Replies
Wan_Intel
Moderator
624 Views

Hi Tarun Mishra,


Thank you for reaching out to us.


Please share more information about your model topology, is it an object detection/classification model, if custom model what type of layers does the model use, environment details (TensorFlow, Python, etc).


On another note, I notice you are using OpenVINO version 2020.4. I suggest you to install the latest OpenVINO 2021.3 for new capabilities and performance improvement.


Regards,

Wan


0 Kudos
TarunM
Beginner
618 Views

I a trying to convert effiecientdet which I have trained on custom data.

It is strange I have used 2021.3 version but its showing you 2020.

Is there any workaround?? 

0 Kudos
Wan_Intel
Moderator
589 Views

Hi Tarun Mishra,

Thanks for your information.


I was getting the same error when I tried to convert your model using the OpenVINO™ Toolkit 2021.3.


However, I have successfully converted your model into IR using the Model Optimizer from the master branch of open source version of OpenVINO™ Toolkit.


Additional support for TensorFlow 2.4 Object Detection API have been enabled for OpenVINO master branch recently, as per the following pull request:

https://github.com/openvinotoolkit/openvino/pull/4772


The Model Optimizer conversion command is as follows:

python mo.py --saved_model_dir "<path_to_saved_model_dir>" --tensorflow_object_detection_api_pipeline_config "<path_to_pipeline_config>\pipeline.config" --transformations_config "<INSTALL_DIR>\model-optimizer\extensions\front\tf\ssd_support_api_v2.4.json"


The open-source version of OpenVINO™ Toolkit is available for download at the following page:

https://github.com/openvinotoolkit/openvino


The steps to build OpenVINO™ Toolkit from source for Windows OS is available here:

https://github.com/openvinotoolkit/openvino/wiki/BuildingForWindows#build-openvino-inference-engine-for-windows-systems



Regards,

Wan


0 Kudos
Wan_Intel
Moderator
568 Views

Hi Tarun Mishra,


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.



Best regards,

Wan


0 Kudos
Reply