Last edited 5 months ago

X-LINUX-AI Tool

This article provide information about the X-LINUX-AI Tool, the way to install it, and how to use it.

1. Description[edit | edit source]

The X-LINUX-AI Tool is a small binary designed to provide users with useful information about the X-LINUX-AI Expansion Package.

It is the entry point to install the packages of X-LINUX-AI on top of the OpenSTLinux Starter Package. It also provides information about the X-LINUX-AI version and supported features.

2. X-LINUX-AI Tool installation[edit | edit source]

Warning white.png Warning
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA0048). The detailed content licenses can be found here.
    apt-get install x-linux-ai-tool

3. How to use X-LINUX-AI Tool[edit | edit source]

Usage:	x-linux-ai -[option]

-v --version            : Show X-LINUX-AI current version if it is installed
-f --supported-features : Print all supported frameworks in this X-LINUX-AI version
-l --list               : Print installed and ready-to-install packages
-i --install <pkg>      : Install X-LINUX-AI package
-r --remove  <pkg>      : Remove X-LINUX-AI package
-h --help               : Show this help

3.1. Usage example[edit | edit source]

  • To show the current version of X-LINUX-AI:
 x-linux-ai -v

Console output :

X-LINUX-AI version: 5.1.0
  • To display X-LINUX-AI features:
 x-linux-ai -f

Console output :

Features:
   * STAI_MPU Unified API based on OpenVX™(STM32MP25x only), TensorFlow™ Lite, Coral Edge TPU™ and ONNX Runtime™ compatible with all STM32MPU series 
   * TIM-VX™ 1.1.57 (STM32MP25x only) 
   * TensorFlow™ Lite 2.11.0 (CPU only) with XNNPACK delegate activated 
   * ONNX Runtime™ 1.14.0 (CPU only) with XNNPACK execution engine activated 
   * Coral Edge TPU™ accelerator native support 
     * libedgetpu 2.0.0 (Grouper) aligned with TensorFlow™ Lite 2.11.0 
     * libcoral 2.0.0 (Grouper) aligned with TensorFlow™ Lite 2.11.0 
     * PyCoral 2.0.0 (Grouper) aligned with TensorFlow™ Lite 2.11.0

Find more information on the wiki page: https://wiki.st.com/stm32mpu/wiki/X-LINUX-AI_OpenSTLinux_Expansion_Package

Applications:
   * Image classification : 
     * C++ / Python™ example using STAI_MPU Unified API]] based on the MobileNet v1 and v2 quantized models 
   * Object detection : 
     * C++ / Python™ example using STAI_MPU Unified API]] based on the SSD MobileNet v1 and v2 quantized models 
     * Python™ example using STAI_MPU Unified API]] based on YoloV8n pose quantized model 
   * Semantic segmentation : 
     * Python™ example using STAI_MPU Unified API]] based on DeepLabV3 quantized model 
   * Face recognition: 
     * C++ example using proprietary model capable of recognizing the face of a known (enrolled) user. 
       * Contact the local STMicroelectronics support for more information about this application or send a request to edge.ai@st.com 
   * Note: applications are based on Gstreamer 1.22.x, GTK 3.x, OpenCV 4.7.x, Pillow, Python 3
  • To list of the packages of X-LINUX-AI:
 x-linux-ai -l

Console output :

 [installed]	    apt-openstlinux-x-linux-ai
 [installed]	    libstai-mpu-ovx5
 [installed]	    libstai-mpu-tools
 [installed]	    libstai-mpu5
 [installed]	    packagegroup-x-linux-ai-demo
 [installed]	    packagegroup-x-linux-ai-npu
 [installed]	    python3-libstai-mpu
 [installed]	    stai-mpu-image-classification-cpp
 [installed]	    stai-mpu-image-classification-cpp-ovx
 [installed]	    stai-mpu-image-classification-python
 [installed]	    stai-mpu-image-classification-python-ovx
 [installed]	    stai-mpu-object-detection-cpp
 [installed]	    stai-mpu-object-detection-cpp-ovx
 [installed]	    stai-mpu-object-detection-python
 [installed]	    stai-mpu-object-detection-python-ovx
 [installed]	    stai-mpu-pose-estimation-python
 [installed]	    stai-mpu-pose-estimation-python-ovx
 [installed]	    stai-mpu-semantic-segmentation-python
 [installed]	    stai-mpu-semantic-segmentation-python-ovx
 [installed]	    tim-vx
 [installed]	    tim-vx-tools
 [installed]	    x-linux-ai-benchmark

 [not installed]    coral-edgetpu-benchmark
 [not installed]    libcoral2
 [not installed]    libedgetpu2
 [not installed]    libstai-mpu-ort5
 [not installed]    libstai-mpu-tflite5
 [not installed]    libtensorflow-lite-tools
 [not installed]    libtensorflow-lite2
 [not installed]    onnxruntime
 [not installed]    onnxruntime-tools
 [not installed]    onnxruntime-unit-tests
 [not installed]    packagegroup-x-linux-ai
 [not installed]    packagegroup-x-linux-ai-coral
 [not installed]    packagegroup-x-linux-ai-onnxruntime
 [not installed]    packagegroup-x-linux-ai-tflite
 [not installed]    python3-libtensorflow-lite
 [not installed]    python3-onnxruntime
 [not installed]    python3-pycoral
 [not installed]    stai-mpu-image-classification-cpp-coral
 [not installed]    stai-mpu-image-classification-cpp-ort
 [not installed]    stai-mpu-image-classification-cpp-tfl
 [not installed]    stai-mpu-image-classification-python-coral
 [not installed]    stai-mpu-image-classification-python-ort
 [not installed]    stai-mpu-image-classification-python-tfl
 [not installed]    stai-mpu-object-detection-cpp-coral
 [not installed]    stai-mpu-object-detection-cpp-ort
 [not installed]    stai-mpu-object-detection-cpp-tfl
 [not installed]    stai-mpu-object-detection-python-coral
 [not installed]    stai-mpu-object-detection-python-ort
 [not installed]    stai-mpu-object-detection-python-tfl

  • To install packages of X-LINUX-AI:
 x-linux-ai -i <package>

Console output :

 {{Board$}} x-linux-ai -i onnxruntime
 Reading package lists... Done
 Building dependency tree... Done
 Reading state information... Done
 The following NEW packages will be installed:
   onnxruntime
 0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
 Need to get 0 B/6089 kB of archives.
 After this operation, 0 B of additional disk space will be used.   
 
 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 at https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses. 
 
 Selecting previously unselected package onnxruntime.
 (Reading database ... 18419 files and directories currently installed.)
 Preparing to unpack .../onnxruntime_1.14.0+git0+6ccaeddefa-r0_arm64.deb ...
 Unpacking onnxruntime (1.14.0+git0+6ccaeddefa-r0) ...
 Setting up onnxruntime (1.14.0+git0+6ccaeddefa-r0) ...
 N: Ignoring file 'packages.openstlinux.st.com.list.tmp' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
 onnxruntime has been installed successfully.
  • To uninstall packages of X-LINUX-AI:
 x-linux-ai -r <package>

Console output :

 {{Board$}} x-linux-ai -r onnxruntime
 Reading package lists... Done
 Building dependency tree... Done
 Reading state information... Done
 The following packages will be REMOVED:
   onnxruntime
 0 upgraded, 0 newly installed, 1 to remove and 16 not upgraded.
 After this operation, 0 B of additional disk space will be used.
 
 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 at https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
 
 (Reading database ... 18423 files and directories currently installed.)
 Removing onnxruntime (1.14.0+git0+6ccaeddefa-r0) ...
 N: Ignoring file 'packages.openstlinux.st.com.list.tmp' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
 onnxruntime has been removed successfully.