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.

Unable to convert VGG-16 to IR

amir__Muhammad
Beginner
959 Views

I have truncated version of vgg16 in .pb format. I am unable to convert to IR getting following error:

[ ANALYSIS INFO ]  It looks like there is IteratorGetNext as input
Run the Model Optimizer with:
                --input "IteratorGetNext:0[-1 224 224 3]"
And replace all negative values with positive values
[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.output_cut.OutputCut'>): Graph contains 0 node after executing <class 'extensions.front.output_cut.OutputCut'>. It considered as error because resulting IR will be empty which is not usual

python3 /opt/intel/openvino_2020.3.194/deployment_tools/model_optimizer/mo_tf.py --input_model fp_firesmokenet-2803-epoch-99.pb

 

0 Kudos
5 Replies
Munesh_Intel
Moderator
959 Views

Hi Muhammad,

Thanks for reaching out.

I would suggest that you first try specifying your input shapes. More information is available at the following page :

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_Converting_Model_General.html#when_to_specify_input_shapes

More information regarding converting a model using Model Optimizer is available as follows:

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#tensorflow_specific_conversion_params

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_Converting_Model_General.html

Additionally, please share more information about your model, whether it's an object detection/classification model, the layers used if it's a custom model and also environment details (versions of OS, TF, Python, CMake, etc.).

If possible, please share the trained model files for us to reproduce your issue (files can be shared via Private Message).

 

Regards,

Munesh

0 Kudos
Munesh_Intel
Moderator
959 Views

Hi Muhammad,

We suspect that the performance issue is due to conversion from TensorFlow to Intermediate Representation (IR), and would like to check the .json file that you are using as well.

As such, please share the command given to Model Optimizer to convert your trained model to IR.

More relevant information is available at the following page:

https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_Object_Detection_API_Models.html#how_to_convert_a_model

 

Regards,

Munesh

0 Kudos
amir__Muhammad
Beginner
959 Views

Hi Manish,

I have used this command with no extra parameters:

python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py  --input_model model.pb -b 1

0 Kudos
amir__Muhammad
Beginner
959 Views

Hi Munesh,

Thanks for the reply. Actually I was able to convert the model to IR. There are some performance issues now, it's basically a fire and smoke detection model, model is able to identify smoke when inference is done with checkpointed model. When doing inference with openvino, it doesn't detect smoke.

I am attaching the files, please check.

 

Thanks

0 Kudos
Munesh_Intel
Moderator
944 Views

Hi Muhammad,


 OpenVINO toolkit officially supports only non-frozen version of VGG-16 models.


More information is available at the following page:

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html#supported_topologies


Hence, I would suggest you try converting again using Model Optimizer based on the steps available in the following page:


https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_Slim_Library_Models.html


Regards,

Munesh


0 Kudos
Reply