-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Unable to convert TF2 model to depthAi blob #785
Comments
You should follow this tutorial for Keras export. Basically you need to transform your model into SavedModel format, which you should be able to successfully compile. In case shapes are causing issues, you can try providing |
Hello! Thanks for the answer. I have successfully saved my model with SavedModel and got the model folder (.pb and 2 cat-s). But when I try to convert my model at http://blobconverter.luxonis.com/ to a blob, I get an error that I only need to load the model's inference graph. If I understand correctly, I need to export inference graph from my original h5 model(or from saved_model fromat). This is right? This params from you Colab examle: https://colab.research.google.com/github/luxonis/depthai-ml-training/blob/master/colab-notebooks/Easy_Object_Detection_With_Custom_Data_Demo_Training.ipynb Do you have examples of using tf2 for OAK-D-Lite? |
Hey, yes, I am not sure that we support upload of folders/ZIPs to blobconverter, while TF2 requires a path to the saved_model_dir. If your Keras model is some normal model, then I don't think you should specify any configs, but I would suggest you to locally install |
Hi, I was able to get both the .xml and .bin files from the open model zoo : in the openvino models directory. Model file /tmp/blobconverter/715fa5c2879b4f4f8dcff70ecdf8ae64/v3-small_224_1/FP16/v3-small_224_1.xml cannot be opened! Help will be greatly appreciated. These are the vanilla files from the openvino website, i did not do custom build. I know the .vino formats work as I was able to test them out with the python scripts. Thank you |
Hey @Whitchurch , |
@tersekmatija Thank you for reaching back: |
Hi I am sad to report that, oak-D is now disconnecting when i try to run depthai_demo.py. But to no avail. I think now I have to stream from my phone camera to my ubuntu system, to feed input for my robot. |
CC @Erol444 on the above issue. |
System information (version)
OpenVINO=> 2021.4
Operating System / Platform => windows 10 64 Bit
Problem classification => blob conversion
Model type => tensorflow2 model
device =>OAK-D-Lite
Detailed description
I have a model which was developed by tensorflow2(Keras). This model solve standart classification problem (detecting objects online and determining their types, now without segmentation and bounding). According to the documentation, all neurolevels of the model are compatible with depthAi. My model is saved in hdm5 format. My goal - run my model on my camera (OAK-D-Lite)
I have tried several options:
All my attempts finished with one error: Cannot get length of dynamic dimension. I don't quite understand what that means.
Could u help me please, what is the possible reason for this error?
Also I tried using your example - https://colab.research.google.com/github/luxonis/depthai-ml-training/blob/master/colab-notebooks/Easy_Object_Detection_With_Custom_Data_Demo_Training.ipynb
In this example, the tensorflow1 model is successfully converted to .blob, but in my case, where tf2 is used, I got an error.
The text was updated successfully, but these errors were encountered: