2024-11-28 06:20 PM - last edited on 2024-11-28 11:54 PM by SofLit
Hi, I am getting this error in the Colab note book. please see attached.
Any idea what is wrong?
Also, it seems this is the only Colab note book that could work. any place for a prject that will work with the pre-trained model?
Thank you.
2024-11-29 06:08 AM - edited 2024-11-29 07:58 AM
Hello @wbotros ,
You get this error because model_list is empty.
If you look at the code:
models_list = [os.path.relpath(model, "../pretrained_models").split(os.sep)[2]+ ": " + os.path.relpath(model, "..\\pretrained_models").split(os.sep)[-1] for model in glob.glob('../pretrained_models/**/*.tflite', recursive = True)]
It tries to get the list of model from the folder /pretrained_models that come from ST Model Zoo but that you don't have in your collab.
You need to clone the st model zoo repository locally and open this notebook locally.
Model zoo before you start: https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main?tab=readme-ov-file#before-you-start
When running this notebook with vscode, I had issues with the widget (to select the board, model ect). I solved it by reinstalling a specific version of ipywidgets: pip install -U ipywidgets==7.7.1
If you know how to both clone the git repository and open the notebook correctly in google collab, then you can do that. I would appreciate it if you could explain how you do it, if you succeed.
Have a good day.
Julian
2024-11-30 09:39 AM
Hello @wbotros ,
Actually, make sure to download a model from the model zoo in section: "Optional: download models from STM32 model zoo" or to upload your own model in the "models" folder in Colab.
Then make sure to select the model among the models stored in the "models" folder (section "Select a model from the models directory").
I just tried on Colab and it was working fine on my side.