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.

Why failed to read after model conversion

New_Beginner
Beginner
179 Views

I am a student who is new to deep learning. I used keras' CNN architecture to build an image classification and recognition model. After converting the "h5" file to the "pb" file according to OpenVINO's official manual, it is converted to "IR" again. After the file, after reading the "bin" and "xml" files by the function "cv.dnn.Net_readFromModelOptimizer", the program is directly closed. I cannot solve this problem. Due to the file size limitation, I can only put the "h5" file Put it below, hope someone can help me.

0 Kudos
3 Replies
New_Beginner
Beginner
170 Views

I used this command to convert "pb" to "IR"

 

python "C:\Program Files (x86)\IntelSWTools\openvino_2021.2.185\deployment_tools\model_optimizer\mo_tf.py" --saved_model_dir model --data_type FP16 --b 1

IntelSupport
Community Manager
153 Views

Hello,

Thanks for reaching out. Here is the command to convert your TensorFlow model (.pb) into the Intermediate Representative (IR) which are the .xml and .bin files within OpenVINO.

1) If your input model in .pb format.

 python3 mo_tf.py --input_model <INFERENCE_GRAPH>.pb --input_checkpoint <INPUT_CHECKPOINT>

2) If your input model in .pbtxt format.

python3 mo_tf.py --input_model <INFERENCE_GRAPH>.pbtxt --input_checkpoint <INPUT_CHECKPOINT> --input_model_is_text

3)Else,you could try using this command

 python3 mo.py --input_model INPUT_MODEL

Refer to the Converting a Model to Intermediate Representation (IR) documentation for more details.

Also, make sure you are executing the OpenVINO environment before you run the conversion.

Regards,

Aznie

 

IntelSupport
Community Manager
128 Views

Hello,

Greetings to you.

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


Reply