Registered User m (Reverted edits by Registered User (-) to last revision by Registered User) Tag: Rollback |
Registered User mNo edit summary Tag: 2017 source edit |
||
(28 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{ApplicableFor | |||
|MPUs list=STM32MP13x, STM32MP15x, STM32MP25x | |||
|MPUs checklist=STM32MP13x, STM32MP15x, STM32MP25x | |||
}}</noinclude> | |||
==Install from the OpenSTLinux AI package repository== | ==Install from the OpenSTLinux AI package repository== | ||
{{Info|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.}} | {{Info|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.}} | ||
Line 9: | Line 14: | ||
You can install them individually or by package group. | You can install them individually or by package group. | ||
===Prerequisites | ==Material needed== | ||
To use the X-LINUX-AI OpenSTLinux Expansion Package, choose one of the following materials: | |||
*'''{{Board | type=257F-EV1}}''' + a Sony™ IMX335 5Mpx sensor | |||
*'''{{Board | type=257F-DK}}''' + a Sony™ IMX335 5Mpx sensor | |||
*'''{{Board | type=157F-DK2}}''' + an UVC USB WebCam | |||
*'''{{Board | type=157F-EV1}}''' with the built in camera module: MB1379 (OmniVision OV5640 parallel camera) | |||
*'''{{Board | type=135F-DK}}''' with the built in camera module: MB1897 (GalaxyCore 2145 parallel camera) | |||
==Prerequisites== | |||
* Flash the Starter Package on your SDCard | * Flash the Starter Package on your SDCard | ||
:'''For OpenSTLinux {{EcosystemRelease | revision=6.0.0}}:''' | |||
:::: | ::[[:Category:Starter_Package|Select and follow the correct Starter Package procedure based on the board used]] | ||
:: | :As example: | ||
:: [[STM32MP25_Evaluation_boards_-_Starter_Package#Downloading_the_image_and_flashing_it_on_the_board|For STM32MP257x-EV, follow this Starter Package procedure]] | |||
:: [[STM32MP15_Discovery_kits_-_Starter_Package#Downloading_the_image_and_flashing_it_on_the_board|For STM32MP157x-DK2, follow this Starter Package procedure]] | |||
* Your board has an internet connection either through the network cable or through a WiFi connection. | * 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: | ||
{{Board$}} export http_proxy='http://<proxy url>:<proxy port>/' | {{Board$}}export http_proxy='http://<proxy url>:<proxy port>/' | ||
}} | }} | ||
=== | ==Boot the OpenSTlinux Starter Package== | ||
Once the board is booted, execute the following command in the console in order to | At the end of the boot sequence, the demo launcher application appears on the screen. | ||
<div class="res-img"> | |||
[[File: STM32MP25_launcher_main_menu.png|center|link=|600px|Demo launcher appearance when X-LINUX-AI is not installed]] | |||
</div> | |||
==Install the X-LINUX-AI tool == | |||
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: | |||
{{InternalInfo| ST employees who would like to download X-LINUX-AI packages by being connected to the internal network will face a cache proxy issue, a workaround is available : | {{InternalInfo| ST employees who would like to download X-LINUX-AI packages by being connected to the internal network will face a cache proxy issue, a workaround is available: | ||
* export the http_proxy and https_proxy by replacing the @appgw.gnb.st.com by @appgw.sgp.st.com | * export the http_proxy and https_proxy by replacing the @appgw.gnb.st.com by @appgw.sgp.st.com | ||
* modify the date of the board using : date +%y%m%d -s "yyyymmdd" and date +%T -s "hh:mm:ss" (adapt it with the local date and hours) | * modify the date of the board using: date +%y%m%d -s "yyyymmdd" and date +%T -s "hh:mm:ss" (adapt it with the local date and hours) | ||
* get and install the debian following the wiki below | * get and install the debian following the wiki below | ||
}} | }} | ||
'''For {{EcosystemRelease | revision=6.0.0}}:''' | |||
* | *Synchronize the OpenSTLinux package repository. | ||
{{Board$}} apt-get | {{Board$}}apt-get update | ||
*Install X-LINUX-AI tool package: | |||
{{Board$}}apt-get install x-linux-ai-tool | |||
* | *Synchronize the X-LINUX-AI package repository. | ||
{{Board$}} apt-get update | {{Board$}}apt-get update | ||
===Install AI packages | *Check that X-LINUX-AI is properly installed: | ||
{{Board$}}x-linux-ai -v | |||
X-LINUX-AI version: {{X-LINUXRelease/Revision | revision=latest | name=AI | type=release}} | |||
{{info| The x-linux-ai binary (installed in the /usr/bin directory) allows to recover information on the X-LINUX-AI delivery, like version, features, supported applications. It is also used for package management, please refer to the [[ X-LINUX-AI tool suite |dedicated wiki page ]] for more information.}} | |||
==Install AI packages== | |||
{{Warning|{{SoftwareLicenseAgreement | distribution=X-LINUX-AI}}}} | {{Warning|{{SoftwareLicenseAgreement | distribution=X-LINUX-AI}}}} | ||
===Install X-LINUX-AI demonstration packages=== | |||
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. | |||
{| | {| | ||
!width=" | !width="50%"| Command | ||
!width=" | !width="50%"| Description | ||
|- | |- | ||
| <pre> | | <pre> x-linux-ai -i packagegroup-x-linux-ai-demo </pre> | ||
| Install | | Install the X-LINUX-AI demonstration packages which provide AI frameworks, application examples and tools dedicated to the board used. | ||
|} | |} | ||
After having [[#Install the X-LINUX-AI tool|installed the x-linux-ai-tool]] you can install the X-LINUX-AI demonstration packages. | |||
{{Board$}}x-linux-ai -i packagegroup-x-linux-ai-demo | |||
And restart the demo launcher: | |||
{{Board$}}systemctl restart weston-graphical-session.service | |||
<div class="mw-collapsible mw-collapsed"> | <div class="mw-collapsible mw-collapsed"> | ||
=== | ===[OPTIONAL] Going further with X-LINUX-AI package management=== | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
====Install X-LINUX-AI package-group ==== | |||
In addition with the X-LINUX-AI demonstration package, there are also other groups of packages dedicated to providing all the necessary packages and tools for a specific artificial intelligence functionality named "packagegroup". | |||
The available packagegroups are the following: | |||
* packagegroup-x-linux-ai-demo: Default packagegroup provinding for X-LINUX-AI expansion package evaluation. | |||
* packagegroup-x-linux-ai-npu: Provide minimal packages to address NN hardware acceleration on NPU for {{Board | type=MP2}}. | |||
* packagegroup-x-linux-ai-<tflite/onnxruntime>: Provide packages and tools dedicated to a specific AI frameworks like TensorFlow Lite and ONNX. | |||
* packagegroup-x-linux-ai: Packagegroup used to install all the packages available in X-LINUX-AI for the target used. | |||
{| | {| | ||
!width=" | !width="50%"| Command | ||
!width=" | !width="50%"| Description | ||
|- | |- | ||
| <pre> | | <pre>x-linux-ai -i packagegroup-x-linux-ai-demo</pre> | ||
| Install | | Install X-LINUX-AI demonstration packages which provide AI frameworks, application examples and tools dedicated to the board used. | ||
|- | |- | ||
| <pre> | | <pre>x-linux-ai -i packagegroup-x-linux-ai-npu</pre> | ||
| Install | | Install X-LINUX-AI packages allowing to use OpenVX stack for the NPU hardware acceleration (including application samples) | ||
|- | |- | ||
| <pre> | | <pre>x-linux-ai -i packagegroup-x-linux-ai-tflite</pre> | ||
| Install | | Install X-LINUX-AI packages related to TensorFlow™ Lite framework (including application samples) | ||
|- | |- | ||
| <pre> | | <pre>x-linux-ai -i packagegroup-x-linux-ai-onnxruntime</pre> | ||
| Install X-LINUX-AI packages related to ONNX Runtime™ (including application samples) | |||
| Install | |||
|- | |- | ||
| <pre> | | <pre>x-linux-ai -i packagegroup-x-linux-ai</pre> | ||
| Install all X-LINUX-AI packages available for the target | |||
| Install | |||
|} | |} | ||
====Install X-LINUX-AI individual packages ==== | |||
To be able to list or manage all the X-LINUX-AI individual packages available please refer to the dedicated [[X-LINUX-AI tool suite]] article | |||
</div> | </div> | ||
</div> | </div> | ||
==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> | |||
== | The demo launcher has the following appearance, and you can navigate into the different screens by using the '''NEXT''' or '''BACK''' buttons. | ||
=== For STM32MP25x lines === | |||
<div class="res-img"> | <div class="res-img"> | ||
[[File: X-LINUX- | [[File: X-LINUX-AI_demo_launcher_AI_mp2.png|center|Demo launcher appearance when X-LINUX-AI is installed on MP25x |link=]] | ||
</div> | </div> | ||
=== | === For STM32MP1 series === | ||
<div class="res-img"> | <div class="res-img"> | ||
[[File: X-LINUX-AI_demo_launcher_AI.png|center|Demo launcher appearance when X-LINUX-AI is installed |link=]] | [[File: X-LINUX-AI_demo_launcher_AI.png|center|Demo launcher appearance when X-LINUX-AI is installed on MP25x |link=]] | ||
</div> | </div> | ||
The demo launcher now contain AI application samples that are described within dedicated article available in the [[X-LINUX-AI application samples | The demo launcher now contain AI application samples that are described within dedicated article available in the [[:Category:AI - Application examples | X-LINUX-AI application samples]] 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 | 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. | You are free to update the C/C++ application or Python scripts for your own purposes, using your own NN models. | ||
Line 220: | Line 150: | ||
Source code locations are provided in application sample pages. | Source code locations are provided in application sample pages. | ||
==References== | |||
<noinclude> | <noinclude> | ||
[[Category:X-LINUX-AI expansion package|01]] | [[Category:X-LINUX-AI expansion package|01]] | ||
{{PublicationRequestId |25195| 2022-11-07 | Page extracted from [[X-LINUX-AI OpenSTLinux Expansion Package]] which was reviewed by TW }} | {{PublicationRequestId |25195| 2022-11-07 | Page extracted from [[X-LINUX-AI OpenSTLinux Expansion Package]] which was reviewed by TW }} | ||
</noinclude> | </noinclude> |
Latest revision as of 13:17, 6 December 2024
1. Install from the OpenSTLinux AI package repository
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
To use the X-LINUX-AI OpenSTLinux Expansion Package, choose one of the following materials:
- unknown board type identifier + a Sony™ IMX335 5Mpx sensor
- unknown board type identifier + 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)
3. Prerequisites
- Flash the Starter Package on your SDCard
- For OpenSTLinux ecosystem release unknown revision 6.0.0
:
- As example:
- Your board has an internet connection either through the network cable or through a WiFi connection.
4. Boot the OpenSTlinux Starter Package
At the end of the boot sequence, the demo launcher application appears on the screen.

5. Install the X-LINUX-AI tool
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 unknown revision 6.0.0 :
- Synchronize the OpenSTLinux package repository.
apt-get update
- Install X-LINUX-AI tool package:
apt-get install x-linux-ai-tool
- Synchronize the X-LINUX-AI package repository.
apt-get update
- Check that X-LINUX-AI is properly installed:
x-linux-ai -v
X-LINUX-AI version: 5.0.0
6. Install AI packages
6.1. Install X-LINUX-AI demonstration packages
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. [OPTIONAL] Going further with X-LINUX-AI package management
7. 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 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

7.2. For STM32MP1 series

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
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