This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
products:sbc:edge2:npu:demos:rknn-tflite [2023/10/23 03:08] sravan created |
products:sbc:edge2:npu:demos:rknn-tflite [2025/06/06 03:24] (current) louis |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== TFLite Edge2 Demo - 8 ====== | + | ====== TFLite Edge2 Demo - 11 ====== |
| We can run TFLite models by converting them into RKNN format and running them on the onboard NPU. | We can run TFLite models by converting them into RKNN format and running them on the onboard NPU. | ||
| + | |||
| + | {{indexmenu_n> | ||
| ===== Get Source code ===== | ===== Get Source code ===== | ||
| Line 17: | Line 19: | ||
| After you have cloned the source code: | After you have cloned the source code: | ||
| - | ==== get the necessary system packages ==== | + | ==== Get the necessary system packages ==== |
| ```shell | ```shell | ||
| $ sudo apt-get install git python3 python3-dev python3-pip | $ sudo apt-get install git python3 python3-dev python3-pip | ||
| Line 27: | Line 29: | ||
| $ git clone https:// | $ git clone https:// | ||
| $ cd rknn-toolkit2 | $ cd rknn-toolkit2 | ||
| - | $ git checkout | + | $ git checkout |
| ``` | ``` | ||
| Line 47: | Line 49: | ||
| and run the command accordingly | and run the command accordingly | ||
| | python version | command | | | python version | command | | ||
| + | | 3.11 | '' | ||
| | 3.10 | '' | | 3.10 | '' | ||
| + | | 3.9 | '' | ||
| | 3.8 | '' | | 3.8 | '' | ||
| + | | 3.7 | '' | ||
| | 3.6 | '' | | 3.6 | '' | ||
| ==== Install the requirements ==== | ==== Install the requirements ==== | ||
| ```shell | ```shell | ||
| - | $ pip3 install -r doc/ | + | $ pip3 install -r rknn-toolkit2/ |
| ``` | ``` | ||
| ==== Install the appropriate toolkit wheel ==== | ==== Install the appropriate toolkit wheel ==== | ||
| ```shell | ```shell | ||
| - | $ pip3 install packages/ | + | $ pip3 install |
| - | $ ../ | + | $ cd ../ |
| ``` | ``` | ||
| Line 85: | Line 90: | ||
| ==== Install necessary python packages ==== | ==== Install necessary python packages ==== | ||
| ```shell | ```shell | ||
| - | $ pip3 install numpy pillow | + | $ pip3 install numpy pillow |
| ``` | ``` | ||
| Line 92: | Line 97: | ||
| $ git clone https:// | $ git clone https:// | ||
| $ cd rknn-toolkit2 | $ cd rknn-toolkit2 | ||
| - | $ git checkout | + | $ git checkout |
| ``` | ``` | ||
| Line 103: | Line 108: | ||
| | 3.11 | '' | | 3.11 | '' | ||
| | 3.10 | '' | | 3.10 | '' | ||
| + | | 3.9 | '' | ||
| | 3.8 | '' | | 3.8 | '' | ||
| + | | 3.7 | '' | ||
| | 3.6 | '' | | 3.6 | '' | ||
| Line 109: | Line 116: | ||
| ```shell | ```shell | ||
| $ pip3 install rknn_toolkit_lite2/ | $ pip3 install rknn_toolkit_lite2/ | ||
| - | $ cd ../../ | ||
| - | ``` | ||
| - | |||
| - | ==== Clone the RKNPU library ==== | ||
| - | ```shell | ||
| - | $ git clone https:// | ||
| - | $ cd rknpu2 | ||
| - | $ git checkout f29bfee21066a35a0a6b789208b630144735acd4 | ||
| ``` | ``` | ||
| ==== Copy the runtime library ==== | ==== Copy the runtime library ==== | ||
| ```shell | ```shell | ||
| - | $ sudo cp runtime/RK3588/ | + | $ sudo cp rknpu2/runtime/ |
| $ cd ../ | $ cd ../ | ||
| ``` | ``` | ||
| + | |||
| ===== Run Examples ===== | ===== Run Examples ===== | ||