Page 1 of 1

Fail to deploy custom yolov5 to Luckfox Pico RV1106

Posted: 2025-01-10 13:44
by ismlcmtzn
Hi,

I am trying to deploy my custom model to the Luckfox Pico RV1106 board. I trained a YOLOv5n model with only one class. Then, I cloned the repository from https://github.com/airockchip/yolov5.git and ran the command:
python export.py --rknpu --weight best.pt

After that, I cloned the repository from https://github.com/airockchip/rknn_model_zoo.git.
cd examples/yolov5/python
python3 convert.py /weight/best.onnx rv1106
[img]file:///home/ubuntu007/Pictures/Screenshots/Screenshot%20from%202025-01-10%2016-39-33.png[/img]

Then
[img]file:///home/ubuntu007/Pictures/Screenshots/Screenshot%20from%202025-01-10%2016-40-35.png[/img]


After I send the folder to the board and...
[root@luckfox rknn_yolov5_demo_v5]# ./rknn_yolov5_demo model/yolov5.rknn model/test.jpg
load lable ./model/coco_80_labels_list.txt
model input num: 1, output num: 3
input tensors:
index=0, name=images, n_dims=4, dims=[1, 640, 640, 3], n_elems=1228800, size=1228800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
output tensors:
index=0, name=output0, n_dims=4, dims=[1, 80, 80, 18], n_elems=115200, size=115200, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=1, name=343, n_dims=4, dims=[1, 40, 40, 18], n_elems=28800, size=28800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=2, name=345, n_dims=4, dims=[1, 20, 20, 18], n_elems=7200, size=7200, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
input_attrs[0].size_with_stride=1228800
model is NHWC input fmt
model input height=640, width=640, channel=3
origin size=640x640 crop size=640x640
input image: 640 x 640, subsampling: 4:2:0, colorspace: YCbCr, orientation: 1
scale=1.000000 dst_box=(0 0 639 639) allow_slight_change=1 _left_offset=0 _top_offset=0 padding_w=0 padding_h=0
rga_api version 1.10.1_[0]
rknn_run
Segmentation fault (core dumped)

I get this error.

Re: Fail to deploy custom yolov5 to Luckfox Pico RV1106

Posted: 2025-01-23 3:55
by Ryand
Check if the exported ONNX model is complete and meets the requirements of RKNN. You can use tools such as Netron to check if the structure of the ONNX model is correct.Reference manual RKNN supports operation waiting list:(https://github.com/rockchip-linux/rknn- ... v1.6.0.pdf). I used the official YOLOv5n model and the results were correct. The link is as follows: ( https://github.com/ultralytics/yolov5/r ... yolov5n.pt)