This article describes the content of X-CUBE-AI embedded documentation and how to access it. The embedded documentation is installed with X-CUBE-AI which ensure to provide the accurate documentation for the considered version of X-CUBE-AI.
1. Documentation content
The embedded documentation describes in details the following topics (for X-CUBE-AI version 7.0.0):
- User Guide
- Installation: specific environment settings to use the Command Line Interface in a console
- Command Line Interface: the stm32ai application is a console utility which provides a complete and unified Command Line Interface (CLI) to generate from a pre-trained DL/ML model, the X-CUBE_AI optimized library for STM32 device family. This section describes in detail the CLI.
- Embedded inference client API: this section describes the embedded inference client API which must be used by a C-application layer (AI client) to use a deployed C-model.
- Evaluation report and metrics: this section describes the different metrics (and associated computing flow) which are used to evaluate the performance of the generated C-files (or C-model) mainly through the validate command.
- Quantized model and quantize command: X-CUBE-AI code generator can be used to deploy a quantized model (8b integer format). Quantization (also called calibration) is an optimization technique to compress a 32-bit floating-point model by reducing the size, by improving CPU/MCU usage and latency with a small degradation of accuracy. This section describes the way X-CUBE-AI support quantized model and the CLI internal post-training quantization process.
- Advanced features
- Relocatable binary network support : a relocatable binary model designates a binary object which can be installed and executed anywhere in a STM32 memory sub-system. It contents a compiled version of the generated NN C-files including the requested forward kernel functions and the weights. The principal objective is to provide a flexible way to upgrade an AI-based application w/o re-generating and flashing the whole end-user firmware. This is the primary element to use for example the FOTA (Firmware Over-The-Air) technology. This section describes how to build and use a relocatable binary.
- Keras LSTM stateful support: this section describes how X-CUBE-AI v7 provides an initial support for the Keras stateful LSTM.
- Keras Lambda/custom layer support: the goal of this section is to explain how you can import a Keras model containing Lambda or Custom layers. Depending on the nature of your model you will have to follow one way or another.
- Platform Observer API:
- STM32 CRC IP as shared resources
- TensorFlow lite for micro-controller support
- HowTo
- How to use USB-CDC driver for validation
- How to run locally a c-model
- How to upgrade a STM32 project
- Supported DL/ML frameworks
- Embedded Python modules - Deep-Learning framework versions
- Keras toolbox
- TensorFlow Lite toolbox
- ONNX toolbox
- Frequently Asked Questions
- Generic aspects
- Validation aspects
- Quantization and post-training quantization process
2. Documentation access
To access the embedded documentation, you shall first install X-CUBE-AI. Installation process is described in the Getting Started document. Once installed, the documentation is installed in the directory installation directory under X-CUBE-AI/7.0.0/Documentation/index.html (the version shall be adapted to the one used, here the 7.0.0). For Windows, by default the documentation is located here (replace <username> by your Windows user name): file:///C:/Users/<username>/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/7.0.0/Documentation/index.html
The embedded documentation can also be accessed through the UI once the X-CUBE-AI Software Package has been selected and loaded by clicking on the "Help" menu then "X-CUBE-AI documentation":