1. Install from the OpenSTLinux AI package repository[edit | edit source]
All the generated X-LINUX-AI packages are available from the OpenSTLinux AI package repository service hosted at the non-browsable URL http://extra.packages.openstlinux.st.com/AI.
This repository contains AI packages that can be simply installed using apt-* utilities, which the same as those used on a Debian system:
- the main group contains the selection of AI packages whose installation is automatically tested by STMicroelectronics
- the updates group is reserved for future uses such as package revision update.
You can install them individually or by package group.
2. Material needed[edit | edit source]
To use the X-LINUX-AI OpenSTLinux Expansion Package, choose one of the following materials:
- STM32MP257F-EV1 Evaluation board + a Sony™ IMX335 5Mpx sensor
- STM32MP257F-DK Discovery kit + a Sony™ IMX335 5Mpx sensor
- STM32MP157F-DK2 Discovery kit + an UVC USB WebCam
- STM32MP157F-EV1 Evaluation board with the built in camera module : MB1379 (OmniVision OV5640 parallel camera)
- STM32MP135F-DK Discovery kit with the built in camera module : MB1897 (GalaxyCore 2145 parallel camera)
Optional:
- Coral USB Edge TPU™[1] accelerator
3. Prerequisites[edit | edit source]
- Flash the Starter Package on your SDCard
- For OpenSTLinux ecosystem release v5.1.0 :
- Your board has an internet connection either through the network cable or through a WiFi connection.
4. Boot the OpenSTlinux Starter Package[edit | edit source]
At the end of the boot sequence, the demo launcher application appears on the screen.
5. Install the X-LINUX-AI tool[edit | edit source]
Once the board is booted, execute the following command in the console in order to download X-LINUX-AI tool package from OpenSTLinux package repository:
For ecosystem release v5.1.0 :
- Synchronize the OpenSTLinux package repository.
apt-get update
- Install X-LINUX-AI tool package:
apt-get install x-linux-ai-tool
- Check that X-LINUX-AI is properly installed:
x-linux-ai -v
X-LINUX-AI version: 5.1.0
6. Install AI packages[edit | edit source]
6.1. Install X-LINUX-AI demonstration packages[edit | edit source]
To get started with X-LINUX-AI, it is recommended to install the X-LINUX-AI demonstration package, which provides all the AI frameworks, applications examples, tools and utilities optimized for the specific target used.
Command | Description |
---|---|
x-linux-ai -i packagegroup-x-linux-ai-demo |
Install the X-LINUX-AI demonstration packages which provide AI frameworks, application examples and tools dedicated to the board used. |
After having installed the x-linux-ai-tool you can install the X-LINUX-AI demonstration packages.
x-linux-ai -i packagegroup-x-linux-ai-demo
And restart the demo launcher:
systemctl restart weston-graphical-session.service
6.2. Install X-LINUX-AI package-group[edit | edit source]
To go further, it is also possible to install specific package-group dedicated to address the NPU for STM32MP2 series' boards or specific AI frameworks liket TensorFlow Lite, ONNX and Coral. It is also possible to install all the X-LINUX-AI packages available on the target at once.
Command | Description |
---|---|
x-linux-ai -i packagegroup-x-linux-ai-npu |
Install X-LINUX-AI packages allowing to use OpenVX stack for the NPU hardware acceleration (including application samples) |
x-linux-ai -i packagegroup-x-linux-ai-tflite |
Install X-LINUX-AI packages related to TensorFlow™ Lite framework (including application samples) |
x-linux-ai -i packagegroup-x-linux-ai-coral |
Install X-LINUX-AI packages related to the Coral Edge TPU™ framework (including application samples) |
x-linux-ai -i packagegroup-x-linux-ai-onnxruntime |
Install X-LINUX-AI packages related to ONNX Runtime™ (including application samples) |
x-linux-ai -i packagegroup-x-linux-ai |
Install all X-LINUX-AI packages available for the target |
6.3. Install X-LINUX-AI individual packages[edit | edit source]
To be able to list or manage all the X-LINUX-AI individual packages available please refer to the dedicated X-LINUX-AI Tool article
7. Launch an AI application sample[edit | edit source]
Once the demo launcher is restarted, notice that it is slightly different because new AI application samples have been installed.
The demo launcher has the following appearance, and you can navigate into the different screens by using the NEXT or BACK buttons.
7.1. For STM32MP25x lines[edit | edit source]
7.2. For STM32MP1 series[edit | edit source]
The demo launcher now contain AI application samples that are described within dedicated article available in the X-LINUX-AI application samples page.
7.3. Enjoy running your own NN models[edit | edit source]
The above examples provide application samples to demonstrate how to execute models easily on the STM32MPUs.
You are free to update the C/C++ application or Python scripts for your own purposes, using your own NN models.
Source code locations are provided in application sample pages.
8. References[edit | edit source]