Hi all

I am trying to convert .pb tensorflow model to blob format using the online blobconverter.
I trained my model and tested it on new data.
During the transformation with blobconverter I keep getting this error when inserting the .pb file :
[ FRAMEWORK ERROR ] Cannot load input model: TensorFlow cannot read the model file: "/tmp/blobconverter/b6e00d0a63854f048baba9621bb7e809/mm/FP16/mm.pb" is incorrect TensorFlow model file.

what is the cause of this issue ? eventhough that I tried different versions of openvino and tensorflow. the model perfoms well in the original format but during conversion I keep getting the same error.

[ FRAMEWORK ERROR ] Cannot load input model: TensorFlow cannot read the model file: "/tmp/blobconverter/b6e00d0a63854f048baba9621bb7e809/mm/FP16/mm.pb" is incorrect TensorFlow model file.
The file should contain one of the following TensorFlow graphs:
1. frozen graph in text or binary format
2. inference graph for freezing with checkpoint (--input_checkpoint) in text or binary format
3. meta graph

Make sure that --input_model_is_text is provided for a model in text format. By default, a model is interpreted in binary format. Framework error details: Error parsing message.
For more information please refer to Model Optimizer FAQ, question #43. (https://docs.openvino.ai/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=43#question-43)

    jakaskerl

    I tried to freeze the model to .pb. I also tried the optimizer locally with different versions but it shows the same error.

    I tried to follow this tutorial provided in depthai/training-ml OpenVINO + OpenCV-OAK - Tensorflow Image Classification.ipynb - Colaboratory (google.com) but during the conversion, it is still not working. I am using the same pipleline for training and I tried to modify the conversion with several tools but I keep getting the error. Is it possible to update the notebook to make it work for the conversion or what should I do exactly ?

    Hey,

    No updates regarding the notebook. It's on our TODO list and will be update accordingly when tested. My assumption why notebook is not working anymore would be that Colab updated some libraries internally and TFv1 is not supported anymore. This means you would have to export the model by following the instructions here. So you need to also provide the assets and variables directories.

      Matija

      Thank you very much. I will keep testing and following your instructions until the notebook is tested.
      Thank you again for your help.

      Martin

        martin181818

        Gave it a quick try but it seems there are certain issues with the normalize operation that's being the part of the model. Ideally this could be moved out, then during the training images would be normalized before being fed to the model. Additional, mo would require --scale 255 flag so it could accept [0, 255] images and properly normalize them.

        By the way, can you link me the exact page where you found this tutorial? I re-checked luxonis/depthai-ml-training repo again and I can't find it.

          martin181818

          Ah I see, I believe we removed it quite some time ago since it's a bit outdated. We are working on a new classification tutorial which will be more up to date but we'll try to fix this one in the meantime