2025-05-26 2:53 PM
I am just starting with STM32CubeMX and X-Cube-AI. I am reading the documentation "Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence (AI)" and got the point where it says to load a "public Keras HAR model file". Where do I find this file?
Solved! Go to Solution.
2025-05-27 1:18 AM
Hello @Robert Ritchey,
I don't what this doc refers exactly to, but you can find HAR models on our model zoo:
stm32ai-modelzoo/human_activity_recognition at main · STMicroelectronics/stm32ai-modelzoo · GitHub
Here you will find 2 types of models trained on different datasets. You will also find readme about both models to learn more about them.
The keras model are the file ending in .h5.
I would suggest you look at our model zoo and our model zoo services as you can do multiple useful things such as retraining a model on your dataset, quantizing models, deploying example application for multiple usecases etc:
GitHub - STMicroelectronics/stm32ai-modelzoo-services: AI Model Zoo services for STM32 devices
X Cube AI is only a GUI for CubeMX. It works thanks to the ST Edge AI Core (the tool that converts python model to C code).
Model zoo services works thanks to python scripts but once you get to the deployment part, it also uses the ST Edge AI Core in background and example CubeIDE application.
You can find the documentation about the ST Edge AI Core here:
https://stedgeai-dc.st.com/assets/embedded-docs/index.html
Hopefully this helps you understand our tool a little bit more.
It can be confusing at the beginning.
Have a good day,
Julian
2025-05-27 1:18 AM
Hello @Robert Ritchey,
I don't what this doc refers exactly to, but you can find HAR models on our model zoo:
stm32ai-modelzoo/human_activity_recognition at main · STMicroelectronics/stm32ai-modelzoo · GitHub
Here you will find 2 types of models trained on different datasets. You will also find readme about both models to learn more about them.
The keras model are the file ending in .h5.
I would suggest you look at our model zoo and our model zoo services as you can do multiple useful things such as retraining a model on your dataset, quantizing models, deploying example application for multiple usecases etc:
GitHub - STMicroelectronics/stm32ai-modelzoo-services: AI Model Zoo services for STM32 devices
X Cube AI is only a GUI for CubeMX. It works thanks to the ST Edge AI Core (the tool that converts python model to C code).
Model zoo services works thanks to python scripts but once you get to the deployment part, it also uses the ST Edge AI Core in background and example CubeIDE application.
You can find the documentation about the ST Edge AI Core here:
https://stedgeai-dc.st.com/assets/embedded-docs/index.html
Hopefully this helps you understand our tool a little bit more.
It can be confusing at the beginning.
Have a good day,
Julian
2025-05-27 6:34 AM
Yes, it is a bit overwhelming at first. Thank you for your pointers. About the zoo, is there a model there that will recognize a particular type of item to the exclusion of others? Any information would be helpful. Thanks.
2025-05-27 7:09 AM - edited 2025-05-27 7:10 AM
Hello @Robert Ritchey,
You can take a look at the object detection use case.
Model we provide are either train on COCO 80 classes dataset (person,car, dog, pc etc) or just the COCO person dataset.
The models will find the object, draw a box around it and give its class.
Depending on what you want to detect, you will most likely have to create/find a dataset of the particular type of item you want to detect and retrain a model (with the model zoo or on your own).
It means that it will exclude the others.
Have a good day,
Julian
2025-05-27 8:15 AM
Thank you, that's exactly what I wanted to know.
2025-05-27 2:18 PM
Is there any documentation that shows me the flow of things. I downloaded the ST Edge Core and it makes no sense to me as to where to begin. I looked at the index and it was just confusing. Quite honestly, I am lost. I looked at the Zoo and Object Detection and it lists 5 models, and I read about them, but I have no idea how to use them. What I really need is a user manual for the whole system and how to use it.
2025-05-28 12:40 AM
Hello @Robert Ritchey,
The st edge ai core is just a command line interface that will convert a python model to C code. It generate the source files but that's it.
To use it, it is better to use X Cube AI (plugin STM32CubeMX), as it will use the st edge ai core but also provide template code.
The best way in my opinion is to use model zoo services, and in your case the object detection part.
Here is the main readme that contains info about retraining a model, quantizition, deployment etc:
As a first step, you could just try to follow the deployment readme on N6 to deploy an AI model and start from there:
Then you could try to go further by using other models, do retraining etc.
The application flashed by model zoo in deployment mode are the getting started N6 (for example the object detection one: GitHub - STMicroelectronics/STM32N6-GettingStarted-ObjectDetection)
These getting started can be used as standalone but they are also provided in model zoo to deploy a complete application with the camera pipeline, model inference and postprocessing.
You can find the STM32CubeIDE project in /model_zoo_services/application_code/object_detection/stm32n6/stm32cubeIDE.
Have a good day,
Julian
2025-05-28 6:10 AM
Thank you, I will follow your suggestions.