Skip to content

Latest commit

 

History

History
 
 

stm32ai_dc_examples

STMicroelectronics – STM32 Dev. Cloud Examples

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.

Available examples

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.

Before you start

    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.