-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update RK3562/RK3566/RK3568/RK3588/RV1103/RV1106 NPU SDK to 1.5.2
Signed-off-by: Randall Zhuo <randall.zhuo@rock-chips.com>
- Loading branch information
Randall Zhuo
committed
Aug 28, 2023
1 parent
4e2101a
commit f29bfee
Showing
101 changed files
with
2,786 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
1、目前RV1106/RV1103仅支持rknn_mobilenet_demo 和 rknn_yolov5_demo两个demo,在examples/RV1106_RV1103目录下,demo中的**build脚本用RV1106指代RV1106/RV1103** | ||
|
||
2、RK356X和RK3588支持example目录下,除examples/RV1106_RV1103文件夹外的所有demo | ||
|
||
3、**RV1106/RV1103设置LD_LIBRARY_PATH必须为全路径**,例如:export LD_LIBRARY_PATH=/userdata/lib | ||
1. Currently, there are only two demo supported on the RV1106/1103 platform,located under the diretory of examples/RV1106_RV1103. **The RV1106 build script is referring to RV1106/RV1103 in the demo**. | ||
|
||
2. For all demos, except for the one under examples/RV1106_RV1103, they are all supported on the platform of RK356X/RK3588. | ||
|
||
3. **When setting LD_LIBRARY_PATH on the RV1106 or RV1103**, it must be the full path. For example, | ||
|
||
```shell | ||
export LD_LIBRARY_PATH=/userdata/lib | ||
``` | ||
|
||
For RK356X, RK3588, LD_LIBRARY_PATH can be set as either full path or relative path | ||
|
||
|
||
4、RK356X和RK3588设置LD_LIBRARY_PATH为全路径和相对路径均可 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
1、目前RV1106/RV1103仅支持rknn_mobilenet_demo 和 rknn_yolov5_demo两个demo,在examples/RV1106_RV1103目录下,demo中的**build脚本用RV1106指代RV1106/RV1103** | ||
|
||
2、RK356X和RK3588支持example目录下,除examples/RV1106_RV1103文件夹外的所有demo | ||
|
||
3、**RV1106/RV1103设置LD_LIBRARY_PATH必须为全路径**,例如:export LD_LIBRARY_PATH=/userdata/lib | ||
|
||
4、RK356X和RK3588设置LD_LIBRARY_PATH为全路径和相对路径均可 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
下述<TARGET_PLATFORM>是RV1106或RV1103 | ||
|
||
# Arm Linux Demo | ||
|
||
## 编译 | ||
|
||
修改目标平台的`build-linux_<TARGET_PLATFORM>.sh`上的`GCC_COMPILER`, | ||
|
||
然后执行 | ||
|
||
``` | ||
./build-linux_<TARGET_PLATFORM>.sh | ||
``` | ||
|
||
## 安装 | ||
|
||
连接设备并将构建输出推送到“/userdata” | ||
|
||
``` | ||
adb push install/rknn_mobilenet_demo_Linux /userdata/ | ||
``` | ||
|
||
## 运行 | ||
|
||
``` | ||
adb shell | ||
cd /userdata/rknn_mobilenet_demo_Linux/ | ||
``` | ||
|
||
``` | ||
export LD_LIBRARY_PATH=./lib | ||
./rknn_mobilenet_demo model/<TARGET_PLATFORM>/mobilenet_v1.rknn model/dog_224x224.jpg | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Yolo-v5 demo | ||
|
||
# 导出rknn模型 | ||
|
||
请参考 https://github.com/airockchip/rknn_model_zoo/tree/main/models/CV/object_detection/yolo | ||
|
||
|
||
|
||
## Arm Linux Demo | ||
|
||
### 编译 | ||
|
||
RV1106/RV1103编译脚本均为 `build-linux_RV1106.sh`,设置交叉编译器所在目录的路径 `RK_RV1106_TOOLCHAIN`,例如修改成 | ||
|
||
```sh | ||
export RK_RV1106_TOOLCHAIN=~/opts/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf | ||
``` | ||
|
||
然后执行: | ||
|
||
```sh | ||
./build-linux_RV1106.sh | ||
``` | ||
|
||
### 推送执行文件到板子 | ||
|
||
连接板子的usb口到PC,将整个demo目录到 `/userdata`: | ||
|
||
```sh | ||
adb push install/rknn_yolov5_demo_Linux /userdata/ | ||
``` | ||
|
||
### 运行 | ||
|
||
```sh | ||
adb shell | ||
cd /userdata/rknn_yolov5_demo_Linux/ | ||
|
||
export LD_LIBRARY_PATH=/userdata/rknn_yolov5_demo_Linux/lib | ||
./rknn_yolov5_demo model/RV1106/yolov5s-640-640.rknn model/bus.jpg | ||
``` | ||
|
||
Note: | ||
|
||
- LD_LIBRARY_PATH 必须采用全路径 | ||
- 基于性能原因,demo中将 RKNN 模型的输出 fmt 设置为 RKNN_QUERY_NATIVE_NHWC_OUTPUT_ATTR,以获取更好的推理性能。此时模型输出 buf 是以 NHWC 顺序进行排布的,比如第一个输出的原始 shape 是 1,255,80,80,此时RKNN输出的 shape 是1,80,80,255,此demo中的后处理也根据这个顺序做了相应的优化调整。 |
Binary file removed
BIN
-177 KB
examples/RV1106_RV1103/rknn_yolov5_demo/convert_rknn_demo/yolov5/bus.jpg
Binary file not shown.
1 change: 0 additions & 1 deletion
1
examples/RV1106_RV1103/rknn_yolov5_demo/convert_rknn_demo/yolov5/dataset.txt
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
examples/RV1106_RV1103/rknn_yolov5_demo/convert_rknn_demo/yolov5/onnx2rknn.py
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-28.5 MB
examples/RV1106_RV1103/rknn_yolov5_demo/convert_rknn_demo/yolov5/onnx_models/yolov5s.onnx
Binary file not shown.
Binary file modified
BIN
-310 KB
(96%)
examples/RV1106_RV1103/rknn_yolov5_demo/model/RV1106/yolov5s-640-640.rknn
Binary file not shown.
Oops, something went wrong.