Registered User m (Jean Christophe Trotin moved page X-LINUX-AI OpenSTLinux expansion package to X-LINUX-AI OpenSTLinux Expansion Package without leaving a redirect: Uppercase for "Expansion" and "Package") |
Registered User mNo edit summary |
||
(41 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[File: | <div class="res-img"> | ||
[[File: AI_X-LINUX-AI-logo.png|center]] | |||
</div> | |||
X-LINUX-AI is an STM32 MPU OpenSTLinux Expansion Package that targets artificial intelligence for STM32MP1 Series devices. | <center> | ||
X-LINUX-AI is an STM32 MPU OpenSTLinux Expansion Package that targets artificial intelligence for STM32MP1 Series devices. It contains Linux AI frameworks, as well as application examples to get started with some basic use cases such as computer vision (CV). It is composed of an OpenEmbedded meta layer, named '''meta-st-stm32mpu-ai''', to be added on top of the [[STM32MP1_Distribution_Package | STM32MP1 Distribution Package]]. It brings a complete and coherent easy-to-build / install environment to take advantage of AI on STM32MP1 Series devices. | |||
It contains Linux AI frameworks, as well as application examples to get started with some basic use cases such as computer vision (CV). | </center> | ||
<div class="res-img"> | |||
It is composed of an OpenEmbedded meta layer, named '''meta-st-stm32mpu-ai''', to be added on top of the [[STM32MP1_Distribution_Package | STM32MP1 Distribution Package]]. | [[File: AI_Expansion_Package_In_STM32MPU_Embedded_Software.png|center]] | ||
</div> | |||
==Versions== | |||
===X-LINUX-AI v2.1.1=== | |||
{{Info| This version is compatible with Yocto Project<sup>®</sup> build system Dunfell and has been validated against the OpenSTLinux {{EcosystemRelease | revision=3.1.0}}, {{EcosystemRelease | revision=3.0.0}}, {{EcosystemRelease | revision=2.1.0}} and validated on STM32MP157x-DKx, STM32MP157x-EV1 and STM32MP157 boards.}} | |||
= | ====Contents==== | ||
* [[File:New.png|30px|link=]] '''TensorFlow Lite<ref name=tensorflowlite_url>[https://www.tensorflow.org/lite TensorFlow Lite]</ref> 2.5.0''' | |||
== | * '''Coral Edge TPU'''<ref name=edgetpu_url>[https://coral.ai/ Coral Edge TPU]</ref> accelerator support | ||
* | ** [[File:New.png|30px|link=]] '''libedgetpu 2.5.0''' aligned with TensorFlow Lite 2.5.0 (built from master branch source code) | ||
* | * [[File:New.png|30px|link=]] '''armNN<ref name=armnn_url>[https://developer.arm.com/ip-products/processors/machine-learning/arm-nn armNN]</ref> 21.05''' | ||
* | * '''OpenCV<ref name=opencv_url>[https://opencv.org/ OpenCV]</ref> 4.1.x''' | ||
* | * '''Python<ref name=python_url>[https://www.python.org/ Python]</ref> 3.8.x''' (enabling Pillow module) | ||
* | * Support '''STM32MP15xF'''<ref name=stm32mp1-series_url>[https://www.st.com/en/microcontrollers-microprocessors/stm32mp1-series.html STM32MP1 series]</ref> devices operating at up to '''800MHz''' | ||
* Support | * Application samples | ||
* | ** [[X-LINUX-AI_application_samples_zoo#TensorFlow_Lite_application_samples | C++ / Python image classification using TensorFlow Lite]] based on MobileNet v1 quantized model | ||
** [[X-LINUX-AI_application_samples_zoo#TensorFlow_Lite_application_samples | | ** [[X-LINUX-AI_application_samples_zoo#TensorFlow_Lite_application_samples | C++ / Python object detection using TensorFlow Lite]] based on COCO SSD MobileNet v1 quantized model | ||
** [[X-LINUX-AI_application_samples_zoo#TensorFlow_Lite_application_samples | | ** [[X-LINUX-AI_application_samples_zoo#Coral_Edge_TPU_application_samples | C++ / Python image classification using Coral Edge TPU]] based on MobileNet v1 quantized model and compiled for the Coral Edge TPU | ||
** [[X-LINUX-AI_application_samples_zoo#Coral_Edge_TPU_application_samples | | ** [[X-LINUX-AI_application_samples_zoo#Coral_Edge_TPU_application_samples | C++ / Python object detection using Coral Edge TPU]] based on COCO SSD MobileNet v1 quantized model and compiled for the Coral Edge TPU | ||
** [[X-LINUX-AI_application_samples_zoo#Coral_Edge_TPU_application_samples | | ** [[X-LINUX-AI_application_samples_zoo#armNN_application_samples | C++ image classification using armNN TensorFlow Lite parser]] based on MobileNet v1 float model | ||
** [[X-LINUX-AI_application_samples_zoo#armNN_application_samples | | ** [[X-LINUX-AI_application_samples_zoo#armNN_application_samples | C++ object detection using armNN TensorFlow Lite parser]] based on COCO SSD MobileNet v1 quantized model | ||
** [[X-LINUX-AI_application_samples_zoo#armNN_application_samples | | ** [[X-LINUX-AI_application_samples_zoo#TensorFlow_Lite_application_samples | C++ face recognition using TensorFlow Lite]] models capable of recognizing the face of a known (enrolled) user (available on demand) | ||
{{Warning | The face recognition binary is available on demand. Please contact the local STMicroelectronics support for more information about this application or send a request to [mailto:edge.ai@st.com edge.ai@st.com]}} | |||
* [[File:New.png|30px|link=]] Application support the 720p, 480p and 272p display configurations | |||
* [[File:New.png|30px|link=]] Application user interface with updated look and feel | |||
==Validated hardware== | ====Validated hardware==== | ||
As any software expansion package, the X-LINUX-AI is supported on all STM32MP1 Series and it has been validated on the following boards: | As any software expansion package, the X-LINUX-AI is supported on all STM32MP1 Series and it has been validated on the following boards: | ||
*'''STM32MP157C-DK2'''<ref name=stm32mp157c-dk2_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32mp157c-dk2.html STM32MP157C-DK2]</ref> | *'''STM32MP157C-DK2'''<ref name=stm32mp157c-dk2_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32mp157c-dk2.html STM32MP157C-DK2]</ref> | ||
Line 32: | Line 40: | ||
*'''STM32MP157A-EV1'''<ref name=stm32mp157a-ev1_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-eval-boards/stm32mp157a-ev1.html STM32MP157A-EV1]</ref> | *'''STM32MP157A-EV1'''<ref name=stm32mp157a-ev1_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-eval-boards/stm32mp157a-ev1.html STM32MP157A-EV1]</ref> | ||
==Software structure== | ====Software structure==== | ||
[[File: X-LINUX-AI_software_structure.png | <div class="res-img"> | ||
[[File: X-LINUX-AI_software_structure.png|center|X-LINUX-AI v2.1.0 Expansion Package Software structure]] | |||
</div> | |||
===X-LINUX-AI v2.1.0=== | |||
[https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/X-LINUX-AI_OpenSTLinux_Expansion_Package#X-LINUX-AI_v2-1-0 X-LINUX-AI v2.1.0 description.] | |||
===X-LINUX-AI v2.0.0=== | |||
[https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/X-LINUX-AI_OpenSTLinux_Expansion_Package#X-LINUX-AI_v2-0-0 X-LINUX-AI v2.0.0 description.] | |||
==Install from the OpenSTLinux AI package repository== | ==Install from the OpenSTLinux AI package repository== | ||
Line 46: | Line 62: | ||
===Prerequisites=== | ===Prerequisites=== | ||
* Flash the Starter Package on your SDCard | |||
::[[Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image|STM32MP157x-DKx Starter Package procedure]] | ::'''For OpenSTLinux {{EcosystemRelease | revision=3.1.0}} and {{EcosystemRelease | revision=3.0.0}}:''' | ||
::or | ::::[[Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image|STM32MP157x-DKx Starter Package procedure]] | ||
::[[Getting_started/STM32MP1_boards/STM32MP157x-EV1/Let%27s_start/Populate_the_target_and_boot_the_image|STM32MP157x-EV1 Starter Package procedure]] | ::::or | ||
::::[[Getting_started/STM32MP1_boards/STM32MP157x-EV1/Let%27s_start/Populate_the_target_and_boot_the_image|STM32MP157x-EV1 Starter Package procedure]] | |||
<div class="mw-collapsible mw-collapsed"> | |||
::'''For OpenSTLinux {{EcosystemRelease | revision=2.1.0}}:''' | |||
<div class="mw-collapsible-content"> | |||
::::[https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image STM32MP157x-DKx Starter Package procedure] | |||
::::or | |||
::::[https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Let%27s_start/Populate_the_target_and_boot_the_image STM32MP157x-EV1 Starter Package procedure] | |||
</div> | |||
</div> | |||
* Your board has an internet connection either through the network cable or through a WiFi connection. | |||
{{Info| | {{Info| | ||
If your internet access depends on a proxy server, you should define the http_proxy environment variable with the following command before any <code>apt-*</code> commands: | If your internet access depends on a proxy server, you should define the http_proxy environment variable with the following command before any <code>apt-*</code> commands: | ||
Line 58: | Line 84: | ||
===Configure the AI OpenSTLinux package repository=== | ===Configure the AI OpenSTLinux package repository=== | ||
Once the board is booted, execute the following command in the console in order to configure the AI OpenSTLinux package repository: | Once the board is booted, execute the following command in the console in order to configure the AI OpenSTLinux package repository: | ||
{{Board$}} wget <nowiki>http:</nowiki>//extra.packages.openstlinux.st.com/AI/ | '''For {{EcosystemRelease | revision=3.1.0}}:''' | ||
{{Board$}} | |||
{{Board$}} wget <nowiki>http:</nowiki>//extra.packages.openstlinux.st.com/AI/3.1/pool/config/a/apt-openstlinux-ai/apt-openstlinux-ai_1.0_armhf.deb | |||
{{Board$}} dpkg -i apt-openstlinux-ai_1.0_armhf.deb | |||
{{ | '''For {{EcosystemRelease | revision=3.0.0}}:'''<span class="mw-collapsible mw-collapsed"> | ||
< | {{Board$}} wget <nowiki>http:</nowiki>//extra.packages.openstlinux.st.com/AI/3.0/pool/config/a/apt-openstlinux-ai/apt-openstlinux-ai_1.0_armhf.deb | ||
{{Board$}} dpkg -i apt-openstlinux-ai_1.0_armhf.deb | |||
</span> | |||
</ | |||
'''For {{EcosystemRelease | revision=2.1.0}}:'''<span class="mw-collapsible mw-collapsed"> | |||
{{Board$}} wget <nowiki>http:</nowiki>//extra.packages.openstlinux.st.com/AI/2.1/pool/config/a/apt-openstlinux-ai/apt-openstlinux-ai_1.0_armhf.deb | |||
{{Board$}} dpkg -i apt-openstlinux-ai_1.0_armhf.deb | |||
</span> | |||
Then synchronize the AI OpenSTLinux package repository. | Then synchronize the AI OpenSTLinux package repository. | ||
Line 124: | Line 154: | ||
| <pre>apt-get install armnn-tensorflow-lite-examples</pre> | | <pre>apt-get install armnn-tensorflow-lite-examples</pre> | ||
| Install armNN TensorFlow Lite examples | | Install armNN TensorFlow Lite examples | ||
|- | |- | ||
| <pre>apt-get install armnn-tfl-cv-apps-image-classification-c++</pre> | | <pre>apt-get install armnn-tfl-cv-apps-image-classification-c++</pre> | ||
Line 136: | Line 163: | ||
| <pre>apt-get install armnn-tools</pre> | | <pre>apt-get install armnn-tools</pre> | ||
| Install armNN utilitites such as unitary tests | | Install armNN utilitites such as unitary tests | ||
|- | |- | ||
| <pre>apt-get install python3-tensorflow-lite</pre> | | <pre>apt-get install python3-tensorflow-lite</pre> | ||
Line 145: | Line 169: | ||
| <pre>apt-get install python3-tensorflow-lite-edgetpu</pre> | | <pre>apt-get install python3-tensorflow-lite-edgetpu</pre> | ||
| Install Python TensorFlow Lite inference engine for Edge TPU | | Install Python TensorFlow Lite inference engine for Edge TPU | ||
|- | |||
| <pre>apt-get install tensorflow-lite-edgetpu</pre> | |||
| Install Edge TPU libraries and the USB rules | |||
|- | |- | ||
| <pre>apt-get install tensorflow-lite-tools</pre> | | <pre>apt-get install tensorflow-lite-tools</pre> | ||
Line 196: | Line 223: | ||
With the following procedure, you can re-generate the complete distribution enabling the X-LINUX-AI expansion package.<br> | With the following procedure, you can re-generate the complete distribution enabling the X-LINUX-AI expansion package.<br> | ||
This procedure is mandatory if you want to update frameworks by yourself, or if you want to modify the application samples.<br> | This procedure is mandatory if you want to update frameworks by yourself, or if you want to modify the application samples.<br> | ||
For | |||
===Download the STM32MP1 Distribution Package=== | |||
'''For {{EcosystemRelease | revision=3.1.0}}''':<br> | |||
Install the [[STM32MP1 Distribution Package - OpenSTLinux distribution#STM32MP15-Ecosystem-v3.1.0 release | STM32MP1 Distribution Package v3.1.0]], {{highlight| but do not initialize the OpenEmbedded environment (do not source the envsetup.sh).}} | |||
<div class="mw-collapsible mw-collapsed"> | <div class="mw-collapsible mw-collapsed"> | ||
'''For {{EcosystemRelease | revision=3.0.0}}''': | |||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
Install the [[STM32MP15_ecosystem_release_note_-_v3.0.0#v3-0-1 | STM32MP1 Distribution Package v3.0.1]], {{highlight| but do not initialize the OpenEmbedded environment (do not source the envsetup.sh).}} | |||
</div> | |||
</div> | |||
== | <div class="mw-collapsible mw-collapsed"> | ||
Install the [[STM32MP1 Distribution Package - OpenSTLinux distribution#STM32MP15-Ecosystem-v2. | '''For {{EcosystemRelease | revision=2.1.0}}''': | ||
<div class="mw-collapsible-content"> | |||
Install the [[stm32mpuv2:STM32MP1 Distribution Package - OpenSTLinux distribution#STM32MP15-Ecosystem-v2.1.0 release | STM32MP1 Distribution Package v2.1.0]], {{highlight| but do not initialize the OpenEmbedded environment (do not source the envsetup.sh).}} | |||
</div> | |||
</div> | |||
====Clone the meta-st-stm32mpu-ai git repositories | ===Install X-LINUX-AI environment === | ||
* '''Clone the meta-st-stm32mpu-ai git repositories''' | |||
{{Warning|{{SoftwareLicenseAgreement | distribution=X-LINUX-AI}}}} | {{Warning|{{SoftwareLicenseAgreement | distribution=X-LINUX-AI}}}} | ||
'''For X-LINUX-AI v2.1.1:''' | |||
{{PC$}} cd <Distribution Package installation directory>/layers/meta-st | |||
{{PC$}} git clone https://github.com/STMicroelectronics/meta-st-stm32mpu-ai.git -b v2.1.1 | |||
'''For X-LINUX-AI v2.1.0:'''<span class="mw-collapsible mw-collapsed"> | |||
{{PC$}} cd <Distribution Package installation directory>/layers/meta-st | {{PC$}} cd <Distribution Package installation directory>/layers/meta-st | ||
{{PC$}} git clone https://github.com/STMicroelectronics/meta-st-stm32mpu-ai.git -b v2. | {{PC$}} git clone https://github.com/STMicroelectronics/meta-st-stm32mpu-ai.git -b v2.1.0 | ||
</span> | |||
* '''Set up the build environment''' | |||
{{PC$}} cd ../.. | {{PC$}} cd ../.. | ||
{{PC$}} DISTRO=openstlinux-weston MACHINE=stm32mp1 | {{PC$}} DISTRO=openstlinux-weston MACHINE=stm32mp1 BSP_DEPENDENCY='layers/meta-st/meta-st-stm32mpu-ai' source layers/meta-st/scripts/envsetup.sh | ||
===Build the image=== | ===Build the image=== | ||
Line 221: | Line 265: | ||
===Flash the built image=== | ===Flash the built image=== | ||
Follow this link to see how to [[STM32MP1_Distribution_Package#Flashing_the_built_image | flash the built image]]. | Follow this link to see how to [[STM32MP1_Distribution_Package#Flashing_the_built_image | flash the built image]]. | ||
=How to use the X-LINUX-AI Expansion Package = | ==How to use the X-LINUX-AI Expansion Package == | ||
==Material needed== | ===Material needed=== | ||
To use the X-LINUX-AI | To use the X-LINUX-AI OpenSTLinux Expansion Package, choose one of the following materials: | ||
*'''STM32MP157C-DK2'''<ref name=stm32mp157c-dk2_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32mp157c-dk2.html STM32MP157C-DK2]</ref> + an UVC USB WebCam | *'''STM32MP157C-DK2'''<ref name=stm32mp157c-dk2_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32mp157c-dk2.html STM32MP157C-DK2]</ref> + an UVC USB WebCam | ||
*'''STM32MP157C-EV1'''<ref name=stm32mp157c-ev1_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-eval-boards/stm32mp157c-ev1.html STM32MP157C-EV1]</ref> with the built in camera | *'''STM32MP157C-EV1'''<ref name=stm32mp157c-ev1_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-eval-boards/stm32mp157c-ev1.html STM32MP157C-EV1]</ref> with the built in OV5640 parallel camera | ||
*'''STM32MP157A-EV1'''<ref name=stm32mp157a-ev1_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-eval-boards/stm32mp157a-ev1.html STM32MP157A-EV1]</ref> with the built in camera | *'''STM32MP157A-EV1'''<ref name=stm32mp157a-ev1_url>[https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-eval-boards/stm32mp157a-ev1.html STM32MP157A-EV1]</ref> with the built in OV5640 parallel camera | ||
Optional: | Optional: | ||
* '''Coral USB Edge TPU'''<ref name=edgetpu_url></ref> accelerator | * '''Coral USB Edge TPU'''<ref name=edgetpu_url></ref> accelerator | ||
==Boot the OpenSTlinux Starter Package== | ===Boot the OpenSTlinux Starter Package=== | ||
At the end of the boot sequence, the demo launcher application appears on the screen. | At the end of the boot sequence, the demo launcher application appears on the screen. | ||
[[File: X-LINUX-AI_demo_launcher_noAI.png | <div class="res-img"> | ||
[[File: X-LINUX-AI_demo_launcher_noAI.png|center|Demo launcher appearance when X-LINUX-AI is not installed]] | |||
</div> | |||
==Install the X-LINUX-AI== | ===Install the X-LINUX-AI=== | ||
{{Warning|{{SoftwareLicenseAgreement | distribution=X-LINUX-AI}}}} | {{Warning|{{SoftwareLicenseAgreement | distribution=X-LINUX-AI}}}} | ||
After having [[#Configure the AI OpenSTLinux package repository|configured the AI OpenSTLinux package]] you can install the X-LINUX-AI components. | After having [[#Configure the AI OpenSTLinux package repository|configured the AI OpenSTLinux package]] you can install the X-LINUX-AI components. | ||
Line 245: | Line 289: | ||
{{Board$}} systemctl restart weston@root | {{Board$}} systemctl restart weston@root | ||
==Launch an AI application sample== | ===Launch an AI application sample=== | ||
Once the demo launcher is restarted, notice that it is slightly different because new AI application samples have been installed.<br> | Once the demo launcher is restarted, notice that it is slightly different because new AI application samples have been installed.<br> | ||
The demo laucher has the following appearance, and you can navigate into the different screens by using the '''NEXT''' or '''BACK''' buttons. | The demo laucher has the following appearance, and you can navigate into the different screens by using the '''NEXT''' or '''BACK''' buttons. | ||
[[File: X-LINUX-AI_demo_launcher_AI.png | <div class="res-img"> | ||
[[File: X-LINUX-AI_demo_launcher_AI.png|center|Demo launcher appearance when X-LINUX-AI is installed]] | |||
</div> | |||
Screens 2, 3 and 4 contain AI application samples that are described within dedicated article available in the [[X-LINUX-AI application samples zoo]] page. | Screens 2, 3 and 4 contain AI application samples that are described within dedicated article available in the [[X-LINUX-AI application samples zoo]] page. | ||
==Enjoy running your own NN models== | ===Enjoy running your own NN models=== | ||
The above examples provide application samples to demonstrate how to execute models easily on the STM32MP1. | The above examples provide application samples to demonstrate how to execute models easily on the STM32MP1. | ||
Line 260: | Line 306: | ||
Source code locations are provided in application sample pages. | Source code locations are provided in application sample pages. | ||
=References= | ==References== | ||
<references /> | <references /> | ||
Latest revision as of 12:22, 14 January 2022
X-LINUX-AI is an STM32 MPU OpenSTLinux Expansion Package that targets artificial intelligence for STM32MP1 Series devices. It contains Linux AI frameworks, as well as application examples to get started with some basic use cases such as computer vision (CV). It is composed of an OpenEmbedded meta layer, named meta-st-stm32mpu-ai, to be added on top of the STM32MP1 Distribution Package. It brings a complete and coherent easy-to-build / install environment to take advantage of AI on STM32MP1 Series devices.
1. Versions
1.1. X-LINUX-AI v2.1.1
![]() |
This version is compatible with Yocto Project® build system Dunfell and has been validated against the OpenSTLinux ecosystem release unknown revision 3.1.0 ![]() ![]() ![]() |
1.1.1. Contents
TensorFlow Lite[1] 2.5.0
- Coral Edge TPU[2] accelerator support
libedgetpu 2.5.0 aligned with TensorFlow Lite 2.5.0 (built from master branch source code)
armNN[3] 21.05
- OpenCV[4] 4.1.x
- Python[5] 3.8.x (enabling Pillow module)
- Support STM32MP15xF[6] devices operating at up to 800MHz
- Application samples
- C++ / Python image classification using TensorFlow Lite based on MobileNet v1 quantized model
- C++ / Python object detection using TensorFlow Lite based on COCO SSD MobileNet v1 quantized model
- C++ / Python image classification using Coral Edge TPU based on MobileNet v1 quantized model and compiled for the Coral Edge TPU
- C++ / Python object detection using Coral Edge TPU based on COCO SSD MobileNet v1 quantized model and compiled for the Coral Edge TPU
- C++ image classification using armNN TensorFlow Lite parser based on MobileNet v1 float model
- C++ object detection using armNN TensorFlow Lite parser based on COCO SSD MobileNet v1 quantized model
- C++ face recognition using TensorFlow Lite models capable of recognizing the face of a known (enrolled) user (available on demand)
![]() |
The face recognition binary is available on demand. Please contact the local STMicroelectronics support for more information about this application or send a request to edge.ai@st.com |
Application support the 720p, 480p and 272p display configurations
Application user interface with updated look and feel
1.1.2. Validated hardware
As any software expansion package, the X-LINUX-AI is supported on all STM32MP1 Series and it has been validated on the following boards:
1.1.3. Software structure
1.2. X-LINUX-AI v2.1.0
X-LINUX-AI v2.1.0 description.
1.3. X-LINUX-AI v2.0.0
X-LINUX-AI v2.0.0 description.
2. Install from the OpenSTLinux AI package repository
![]() |
The STMicroelectronics packages repository service is provided for evaluation purposes only, its content may be updated at any time without notice and is therefore not approved for use in production. |
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.1. Prerequisites
- Flash the Starter Package on your SDCard
- For OpenSTLinux ecosystem release unknown revision 3.1.0
and ecosystem release unknown revision 3.0.0
:
- For OpenSTLinux ecosystem release unknown revision 3.1.0
- For OpenSTLinux ecosystem release unknown revision 2.1.0
:
- For OpenSTLinux ecosystem release unknown revision 2.1.0
- Your board has an internet connection either through the network cable or through a WiFi connection.
![]() |
If your internet access depends on a proxy server, you should define the http_proxy environment variable with the following command before any
Board $> export http_proxy='http://<proxy url>:<proxy port>/'
|
2.2. Configure the AI OpenSTLinux package repository
Once the board is booted, execute the following command in the console in order to configure the AI OpenSTLinux package repository:
unknown revision 3.1.0For ecosystem release: Board $> wget http://extra.packages.openstlinux.st.com/AI/3.1/pool/config/a/apt-openstlinux-ai/apt-openstlinux-ai_1.0_armhf.deb Board $> dpkg -i apt-openstlinux-ai_1.0_armhf.deb
unknown revision 3.0.0For ecosystem release:Expand
unknown revision 2.1.0For ecosystem release:Expand
Then synchronize the AI OpenSTLinux package repository.
Board $> apt-get update
2.3. Install AI packages
![]() |
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found here. |
2.3.1. Install all X-LINUX-AI packages
Command | Description |
---|---|
apt-get install packagegroup-x-linux-ai |
Install all the X-LINUX-AI packages (TensorFlow Lite, Edge TPU, armNN, application samples and tools) |
2.3.3. Install individual packages
![]() |
If you need more information about how to use apt-* utilities check the Package repository for OpenSTLinux distribution article. |
3. Re-generate X-LINUX-AI OpenSTLinux distribution
With the following procedure, you can re-generate the complete distribution enabling the X-LINUX-AI expansion package.
This procedure is mandatory if you want to update frameworks by yourself, or if you want to modify the application samples.
3.1. Download the STM32MP1 Distribution Package
For ecosystem release unknown revision 3.1.0 :
Install the STM32MP1 Distribution Package v3.1.0, but do not initialize the OpenEmbedded environment (do not source the envsetup.sh).
For ecosystem release unknown revision 3.0.0 :
For ecosystem release unknown revision 2.1.0 :
3.2. Install X-LINUX-AI environment
- Clone the meta-st-stm32mpu-ai git repositories
![]() |
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found here. |
https://github.com/STMicroelectronics/meta-st-stm32mpu-ai.git -b v2.1.1 For X-LINUX-AI v2.1.0:ExpandFor X-LINUX-AI v2.1.1: PC $> cd <Distribution Package installation directory>/layers/meta-st PC $> git clone
- Set up the build environment
PC $> cd ../..
PC $> DISTRO=openstlinux-weston MACHINE=stm32mp1 BSP_DEPENDENCY='layers/meta-st/meta-st-stm32mpu-ai' source layers/meta-st/scripts/envsetup.sh
3.3. Build the image
PC $> bitbake st-image-ai
![]() |
Note that building the image could take long time depending on the host computer performance. |
3.4. Flash the built image
Follow this link to see how to flash the built image.
4. How to use the X-LINUX-AI Expansion Package
4.1. Material needed
To use the X-LINUX-AI OpenSTLinux Expansion Package, choose one of the following materials:
- STM32MP157C-DK2[7] + an UVC USB WebCam
- STM32MP157C-EV1[8] with the built in OV5640 parallel camera
- STM32MP157A-EV1[9] with the built in OV5640 parallel camera
Optional:
- Coral USB Edge TPU[2] accelerator
4.2. Boot the OpenSTlinux Starter Package
At the end of the boot sequence, the demo launcher application appears on the screen.
4.3. Install the X-LINUX-AI
![]() |
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found here. |
After having configured the AI OpenSTLinux package you can install the X-LINUX-AI components.
Board $> apt-get install packagegroup-x-linux-ai
And restart the demo launcher
Board $> systemctl restart weston@root
4.4. Launch an AI application sample
Once the demo launcher is restarted, notice that it is slightly different because new AI application samples have been installed.
The demo laucher has the following appearance, and you can navigate into the different screens by using the NEXT or BACK buttons.
Screens 2, 3 and 4 contain AI application samples that are described within dedicated article available in the X-LINUX-AI application samples zoo page.
4.5. Enjoy running your own NN models
The above examples provide application samples to demonstrate how to execute models easily on the STM32MP1.
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.
5. References