This shows you the differences between two versions of the page.
| 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> | The Delegate is provided by ARM as [[gh> | ||
| + | |||
| <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 |
| - | | VIM3L | 4.9 \\ 5.15 | Ubuntu 22.04| | + | | VIM3L | 4.9 \\ 5.15 |
| - | | VIM4| 5.4 \\ 5.15 | Ubuntu 22.04| | + | | VIM4 |
| - | | Edge2| 5.10| Ubuntu 22.04| | + | | Edge2 | 5.10 \\ 6.1 | Ubuntu 22.04 \\ Ubuntu 24.04 |
| - | </ | + | |
| - | <WRAP important> | + | You can refer to the [[products: |
| - | VIM3 has limited OpenCL capability and cannot run models which are compiled | + | |
| </ | </ | ||
| - | ===== Get source code ===== | + | ===== Setup the environment |
| - | Clone the examples [[gh> | + | ==== 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, | ||
| + | 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:// | + | $ 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 |
| - | ==== Install pip ==== | + | |
| ```shell | ```shell | ||
| - | $ sudo apt-get install | + | $ python3.10 -m venv work |
| ``` | ``` | ||
| - | ==== Install necessary python packages ==== | + | Activate the virtual environment |
| ```shell | ```shell | ||
| - | $ pip3 install numpy pillow | + | $ source work/ |
| ``` | ``` | ||
| - | ==== Install | + | Deactivate the virtual environment |
| + | ```shell | ||
| + | $ deactivate | ||
| + | ``` | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Get source code ===== | ||
| + | Clone the examples [[gh> | ||
| + | |||
| + | ```shell | ||
| + | $ git clone https:// | ||
| + | $ cd armnn_tflite | ||
| + | ``` | ||
| + | |||
| + | ==== Install necessary python packages | ||
| ```shell | ```shell | ||
| - | $ pip3 install | + | pip3 install |
| ``` | ``` | ||
| ==== Download ArmNN libraries ==== | ==== Download ArmNN libraries ==== | ||
| ```shell | ```shell | ||
| - | $ wget -O ArmNN-aarch64.tgz https:// | + | $ wget -O ArmNN-aarch64.tgz https:// |
| $ 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 ../ | + | $ sudo ln ../libs/delegate/ |
| - | $ sudo ln ../ | + | $ sudo ln ../ |
| ``` | ``` | ||