2025-03-24 1:40 AM
Im trying to deploy an audio detection model i trained and developed using yamnet onto the B-U585I-IOT02A board that differentiates between normal and abnormal machine sounds. I am trying to implement the AI on stm32cubeide but dont know how to do it. I saw a freertos guide or something but dont really know how to implement or use it?
2025-03-24 5:52 AM - last edited on 2025-03-24 5:58 AM by Andrew Neil
Duplicate - merged.
I get this error when trying to open the .ioc file. I opened the project of freertos from stm32 model zoo for audio.
Invalid Input: Must be project's active .ioc file.
Project's 'Projects' active one is 'Projects.ioc' file
2025-03-24 7:57 AM
Hello @jzzunn
it seems that you use the ST Model Zoo.
In this case, please look at this tutorial on how to deploy a model on a B-U585I-IOT02A
If you have any issues following this tutorial, feel free to reach out to me!
Have a good day,
Julian
2025-03-24 8:36 AM
I dont want to use the deployment tutorial because i am trying to do it with my own model file that i converted using stm32 cloud ai
2025-03-24 9:12 AM
First, you can deploy your own model with it. Model Zoo will generate the same files as Stm32 Dev Cloud did.
Then, about your ioc issue, where did you get this file?
Julian
2025-03-24 9:33 AM
This is my model, the feature extraction layers uses YAMNet's pretrained feature extraction and adding my own classification layers on top:
2025-03-24 9:37 AM
I just added the project from the freertos folder of stm32 model zoo didnt change anything, but i think it was because the ioc file was placed outside the actual project for some reason
2025-03-24 9:49 AM
How do i implement this model to the custom_model.py code because i dont have feature extraction layers, im just importing yamnet's feature extraction from tensorflowhub. Besides, Im trying to develop a webserver that can deploy models to the stm32 board from the server itself so i would prefer not to use model zoo config files etc because it is not very user friendly
2025-03-25 2:13 AM
Hello @jzzunn ,
I think that the best way for you to deploy your model is to use X Cube AI from STM32CubeMX.
Take a look at this document: UM2526Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence (AI) (https://www.st.com/en/embedded-software/x-cube-ai.html#documentation)
With this, you should be able to generate a template application that run an inference of your model with a random input and outputs via serial some metrics.
In the generated code, the API related to AI is explained here:
https://stedgeai-dc.st.com/assets/embedded-docs/embedded_client_api_legacy.html
Have a good day,
Julian