Page 1 of 1

在luckfox pico rv1106g3的板子上,运行rknn_model_zoo编译生成的yolov8,是否可以?

Posted: 2026-07-18 15:19
by jim_qiu

如果可以,请告知详细步骤,我想先在luckfox pico rv1106g3的板子上,用yolov8n,对一张图片,做推理,我的rknn_model_zoo.git信息如下:
(rknn) root@localhost:~/rknn_model_zoo# git remote -v
origin https://github.com/airockchip/rknn_model_zoo.git (fetch)
origin https://github.com/airockchip/rknn_model_zoo.git (push)
在wsl2里,操作步骤如下:
1. cd /root/rknn_model_zoo/examples/yolov8/model
2. ./download_model.sh
3. cd /root/rknn_model_zoo/examples/yolov8/python/
4. python3 convert.py ../model/yolov8n.onnx rv1106
结果是:
I rknn-toolkit2 version: 2.3.2
--> Config model
done
--> Loading model
I Loading : 100%|██████████████████████████████████████████████| 126/126 [00:00<00:00, 35756.58it/s]
done
--> Building model
I OpFusing 0: 100%|█████████████████████████████████████████████| 100/100 [00:00<00:00, 2058.11it/s]
I OpFusing 1 : 100%|████████████████████████████████████████████| 100/100 [00:00<00:00, 1132.10it/s]
I OpFusing 0 : 100%|█████████████████████████████████████████████| 100/100 [00:00<00:00, 962.77it/s]
I OpFusing 1 : 100%|█████████████████████████████████████████████| 100/100 [00:00<00:00, 846.63it/s]
I OpFusing 2 : 100%|█████████████████████████████████████████████| 100/100 [00:00<00:00, 257.50it/s]
W build: found outlier value, this may affect quantization accuracy
const name abs_mean abs_std outlier value
model.0.conv.weight 2.44 2.47 -17.494
model.22.cv3.2.1.conv.weight 0.09 0.14 -10.215
model.22.cv3.1.1.conv.weight 0.12 0.19 13.361, 13.317
model.22.cv3.0.1.conv.weight 0.18 0.20 -11.216
I GraphPreparing : 100%|███████████████████████████████████████| 161/161 [00:00<00:00, 11685.93it/s]
I Quantizating : 100%|████████████████████████████████████████████| 161/161 [00:04<00:00, 36.59it/s]
W build: The default input dtype of 'images' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '318' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of 'onnx::ReduceSum_326' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '331' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '338' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of 'onnx::ReduceSum_346' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '350' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '357' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of 'onnx::ReduceSum_365' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
W build: The default output dtype of '369' is changed from 'float32' to 'int8' in rknn model for performance!
Please take care of this change when deploy rknn model with Runtime API!
I rknn building ...
I rknn building done.
done
--> Export rknn model
done
5. export GCC_COMPILER=/home/Echo-Mate/SDK/rv1106-sdk/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf
6. cd /root/rknn_model_zoo/
7. ./build-linux.sh -t rv1106 -a armv7l -d yolov8
结果如下:
/home/Echo-Mate/SDK/rv1106-sdk/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf
===================================
BUILD_DEMO_NAME=yolov8
BUILD_DEMO_PATH=examples/yolov8/cpp
TARGET_SOC=rv1106
TARGET_ARCH=armv7l
BUILD_TYPE=Release
ENABLE_ASAN=OFF
DISABLE_RGA=OFF
DISABLE_LIBJPEG=OFF
INSTALL_DIR=/root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo
BUILD_DIR=/root/rknn_model_zoo/build/build_rknn_yolov8_demo_rv1106_linux_armv7l_Release
CC=/home/Echo-Mate/SDK/rv1106-sdk/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc
CXX=/home/Echo-Mate/SDK/rv1106-sdk/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-g++
===================================
-- !!!!!!!!!!!CMAKE_SYSTEM_NAME: Linux
-- Configuring done
-- Generating done
-- Build files have been written to: /root/rknn_model_zoo/build/build_rknn_yolov8_demo_rv1106_linux_armv7l_Release
Consolidate compiler generated dependencies of target fileutils
Consolidate compiler generated dependencies of target audioutils
Consolidate compiler generated dependencies of target imageutils
Consolidate compiler generated dependencies of target imagedrawing
[ 25%] Built target fileutils
[ 33%] Built target audioutils
[ 50%] Built target imagedrawing
[ 66%] Built target imageutils
Consolidate compiler generated dependencies of target rknn_yolov8_demo
[ 75%] Building CXX object CMakeFiles/rknn_yolov8_demo.dir/main.cc.o
[ 83%] Linking CXX executable rknn_yolov8_demo
[100%] Built target rknn_yolov8_demo
[ 16%] Built target imageutils
[ 33%] Built target fileutils
[ 50%] Built target imagedrawing
Consolidate compiler generated dependencies of target rknn_yolov8_demo
[ 83%] Built target rknn_yolov8_demo
[100%] Built target audioutils
Install the project...
-- Install configuration: "Release"
-- Installing: /root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/./rknn_yolov8_demo
-- Set runtime path of "/root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/./rknn_yolov8_demo" to "$ORIGIN/../lib"
-- Installing: /root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/model/bus.jpg
-- Installing: /root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/model/coco_80_labels_list.txt
-- Installing: /root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/model/yolov8.rknn
-- Installing: /root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/model/yolov8n_320_rv1106_int8.rknn
-- Installing: /root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/lib/librknnmrt.so
-- Installing: /root/rknn_model_zoo/install/rv1106_linux_armv7l/rknn_yolov8_demo/lib/librga.so
8. adb push install/rv1106_linux_armv7l/rknn_yolov8_demo/ /root/
9. adb shell
10. cd /root/rknn_yolov8_demo/
11. chmod a+x rknn_yolov8_demo
12. ./rknn_yolov8_demo model/yolov8.rknn model/bus.jpg
结果出错,信息如下:
load lable ./model/coco_80_labels_list.txt
E RKNN: failed to decode config data!
Segmentation fault (core dumped)