You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 70e34291f6
Rockchip Anroid14_SDK 20241219-rkr6 (2f87fee1)
1 year ago
..
include Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 2 years ago
model Rockchip Anroid14_SDK 20241219-rkr6 (2f87fee1) 1 year ago
src Rockchip Anroid14_SDK 20241219-rkr6 (2f87fee1) 1 year ago
CMakeLists.txt Rockchip Anroid14_SDK 20241219-rkr6 (2f87fee1) 1 year ago
README.md Rockchip Anroid14_SDK 20241219-rkr6 (2f87fee1) 1 year ago
README_CN.md Rockchip Anroid14_SDK 20241219-rkr6 (2f87fee1) 1 year ago
build-linux.sh Rockchip Anroid14_SDK 20241219-rkr6 (2f87fee1) 1 year ago

README.md

Yolo-v5 demo

The following <TARGET_PLATFORM> is RV1106, RV1106B RV1103 or RV1103B.

Export RKNN Model

Please refer https://github.com/airockchip/rknn_model_zoo/tree/main/models/CV/object_detection/yolo

Arm Linux Demo

Compiling and Building

The 'build-linux.sh' can be used for compiling demo for target including RV1106 and RV1103.

Changing the cross compiler path via the setting the RK_RV1106_TOOLCHAIN, shown as below:

export RK_RV1106_TOOLCHAIN=~/opts/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf

then, run the script

./build-linux.sh -t <TARGET_PLATFORM> -b Release

Note: The RV1106 and RV1103 requires this 'arm-rockchip830-linux-uclibcgnueabihf' compiler to build the demo or another applications.

Push build output files to the board

Connecting the usb port to the PC, and pushing all demo folder to the directory '/userdata':

adb push install/rknn_yolov5_demo_Linux /userdata/

Running

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 must use the full path
  • For performance reasons, the output fmt of the RKNN model is set to RKNN_QUERY_NATIVE_NHWC_OUTPUT_ATTR in the demo to obtain better inference performance. At this time, the model output buf is arranged in the order of NHWC. For example, the original shape of the first output is 1,255,80,80. At this case, the shape output by RKNN is 1,80,80,255. The post-processing in this demo is also optimized and adjusted according to this order.
  • RV1103B and RV1106B do not support NHWC output yet