luxonis / depthai-experiments

Experimental projects we've done with DepthAI.
MIT License
801 stars 357 forks source link

Error in Tensorflow to OpenVino Conversion in Google Colab (gen2-tf-image-classification) #465

Open aditya-AI opened 1 year ago

aditya-AI commented 1 year ago

Hi Team,

In the gen2-tf-image-classification example (Link: https://github.com/luxonis/depthai-experiments/tree/master/gen2-tf-image-classification) the TensorFlow to OpenVino (IR format) conversion is not working anymore. It was working a month ago but now its giving error. It seems to be an issue with the OpenVino installation in Google Colab as the OpenVino Validation Demo Code is also failing

/opt/intel/openvino_2021/deployment_tools/demo/demo_squeezenet_download_convert_run.sh

Below is the error I get:

Screenshot 2023-03-15 at 9 49 44 PM

To get better understanding of the error I ran the OpenVino validation demo without subprocess module below are the screenshots:

Screenshot 2023-03-15 at 9 51 46 PM

Screenshot 2023-03-15 at 9 52 06 PM

Also when the runtime in colab is GPU then the error is different:

Screenshot 2023-03-15 at 10 02 51 PM

@Erol444 please tag the ML folks who can help me with this issue. Thanks in Advance!

tersekmatija commented 1 year ago

@HonzaCuhel Do you mind looking into this? It's likely some version issue or some sort of Colab issue. If there's an easy way to "modernize" the notebook we should do it.

aditya-AI commented 1 year ago

@tersekmatija I have fixed the issue. Will update notebook and create a PR. I tried different OpenVino version, the best way to do it was with version 2022.1 however the predictions on OAK were not good the IR predictions were good. So I had refrain from using that even tried with a combination of IR and the Blob converter tool by Luxonis.

Give me sometime and would create a PR on this. Thanks!

Shall I close this issue? @tersekmatija

tersekmatija commented 1 year ago

Give me sometime and would create a PR on this. Thanks!

Thanks!

So I had refrain from using that even tried with a combination of IR and the Blob converter tool by Luxonis.

@aditya-AI It might be that export parameters passed to model optimizer were wrongly specified. So if you use any image normalization, this should be specified when exporting the model.

You can close the issue and open a new one if having issues with predictions or we can try solving it in this one :)