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.

Error in converting tensorflow model to IR

TarunM
Beginner
312 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
283 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


TarunM
Beginner
277 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?? 

Wan_Intel
Moderator
248 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-...



Regards,

Wan


Wan_Intel
Moderator
227 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


Reply