Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:applications:armnn-tflite

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
products:sbc:common:applications:armnn-tflite [2023/10/23 02:52]
sravan created
products:sbc:common:applications:armnn-tflite [2024/12/16 05:22] (current)
sravan [Install necessary python packages]
Line 5: Line 5:
  
 The Delegate is provided by ARM as [[gh>arm-software/armnn]] and the provided examples are made to make use of it. The Delegate is provided by ARM as [[gh>arm-software/armnn]] and the provided examples are made to make use of it.
 +
  
 <WRAP info> <WRAP info>
 This library depends on OpenCL, make sure you are using the following platforms to ensure the driver is present. This library depends on OpenCL, make sure you are using the following platforms to ensure the driver is present.
-^ board ^ Linux Kernel (BSP) ^ OS ^  +^ board  ^ Linux Kernel (BSP)  ^ OS                            
-| VIM3 | 4.9 \\ 5.15 | Ubuntu 22.04| +| VIM3   | 4.9 \\ 5.15         | Ubuntu 22.04 \\ Ubuntu 24.04  
-| VIM3L | 4.9 \\ 5.15 | Ubuntu 22.04| +| VIM3L  | 4.9 \\ 5.15         | Ubuntu 22.04 \\ Ubuntu 24.04  
-| VIM4| 5.4 \\ 5.15 | Ubuntu 22.04| +| VIM4   | 5.4 \\ 5.15         | Ubuntu 22.04 \\ Ubuntu 24.04  
-| Edge2| 5.10| Ubuntu 22.04| +| Edge2  | 5.10 \\ 6.1         | Ubuntu 22.04 \\ Ubuntu 24.04  |
-</WRAP>+
  
-<WRAP important> +You can refer to the [[products:sbc:common:applications:opencl|]] doc for more info.
-VIM3 has limited OpenCL capability and cannot run models which are compiled to have non-uniform workloads, as a result ''GpuAcc'' will be broken, you will need to use the ''CpuAcc'' backend.+
 </WRAP> </WRAP>
  
-===== Get source code ===== +===== Setup the environment ===== 
-Clone the examples [[gh>sravansenthiln1/armnn_tflite]]+==== Install pip ==== 
 +```shell 
 +$ sudo apt-get install python3-pip 
 +```
  
 +<WRAP important> 
 +Ubuntu 24.04 ships with the updated 3.12 version of python which Tensorflow has not been updated to the newer python version, hence we must use an older supported version.
 +
 +Furthermore, it has constraints on installing non-system python packages,
 +as a result, python packages must be installed inside a python virtual environment to avoid conflicts.
 +
 +You must activate this environment whenever you need to use the application.
 +
 +Add the alternate python repository
 ```shell ```shell
-git clone https://github.com/sravansenthiln1/armnn_tflite +sudo add-apt-repository ppa:deadsnakes/ppa 
-cd armnn_tflite+sudo apt install python3.10 python3.10-venv
 ``` ```
  
-===== Setup the environment ===== +Create a new virtual environment
-==== Install pip ====+
 ```shell ```shell
-sudo apt-get install python3-pip+$ python3.10 -m venv work
 ``` ```
  
-==== Install necessary python packages ====+Activate the virtual environment
 ```shell ```shell
-pip3 install numpy pillow+source work/bin/activate
 ``` ```
  
-==== Install the TFLite runtime interpreter ====+Deactivate the virtual environment 
 +```shell 
 +$ deactivate 
 +``` 
 + 
 +</WRAP> 
 + 
 +===== Get source code ===== 
 +Clone the examples [[gh>sravansenthiln1/armnn_tflite]] 
 + 
 +```shell 
 +$ git clone https://github.com/sravansenthiln1/armnn_tflite 
 +$ cd armnn_tflite 
 +``` 
 + 
 +==== Install necessary python packages ====
 ```shell ```shell
-pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime+pip3 install numpy==1.26.tflite_runtime pillow opencv librosa sounddevice
 ``` ```
  
 ==== Download ArmNN libraries ==== ==== Download ArmNN libraries ====
 ```shell ```shell
-$ wget -O ArmNN-aarch64.tgz https://github.com/ARM-software/armnn/releases/download/v23.08/ArmNN-linux-aarch64.tar.gz+$ wget -O ArmNN-aarch64.tgz https://github.com/ARM-software/armnn/releases/download/v24.11/ArmNN-linux-aarch64.tar.gz
 $ mkdir libs $ mkdir libs
 $ tar -xvf ArmNN-aarch64.tgz -C libs $ tar -xvf ArmNN-aarch64.tgz -C libs
Line 60: Line 85:
 ==== Create library symlinks ==== ==== Create library symlinks ====
 ```shell ```shell
-$ sudo ln ../libs/libarmnnDelegate.so.29.libarmnnDelegate.so.29 +$ sudo ln ../libs/delegate/libarmnnDelegate.so.29.libarmnnDelegate.so.29 
-$ sudo ln ../libs/libarmnn.so.33.0 libarmnn.so.33+$ sudo ln ../libs/libarmnn.so.34.0 libarmnn.so.34
 ``` ```
  
Last modified: 2023/10/23 02:52 by sravan