This folder provides a collection of examples that you can use in order to get started with STM32Cube.AI Developer Cloud Python Interface.
You will retrieve multiples files in order to analyze, validate, generate code, benchmark your model to STM32 Benchmark Farm or simply connect.
- Connect to STM32Cube.AI Developer Cloud
- Analyze a model
- Validate a model
- Generate associated C code
- Benchmark my model to STM32 Benchmark Farm
Connect to STM32Cube.AI Dev. Cloud script describes how you shall configure your environment variables in order to use our service. It includes env. getters, and a request to get your user informations
Analyze script allows to get informations about a given model, such as weights, activations size, flash and ram constraints including library size.
Validate script permits to get the same informations as analyze, but includes metrics to compare the accuracy of generated C model and original model (from a numerical standpoint). Both models are loaded with the same input tensors (with fixed random inputs or custom dataset)
Generate script permits to get the same informations as analyze, but generates STM32CubeAI Library and C Code associated to an input model.
Benchmark script permits to get informations about a given model associated to a true board, and gives total inference time associated to a model.
- Create, if not already done, an account by connecting to STM32Cube.AI Developer Cloud to be able to use the service.
- Install all the necessary python packages listed in requirement file
pip install -r ./requirements.txt
- Once you have logged in to your MyST account, add your username and password in env. variables
export STM32AI_USERNAME="[email protected]"
export STM32AI_PASSWORD="password"
- When getting started with one example, kindly replace
SET_YOUR_OWN_MODEL_NAME_HERE
by the path of your own model.