Thank you for this forum.
I am trying to make a object detector i tried to get the dataset from roboflow. Then i trained the mode >> converted using yolov5 to rknn to onnx >> then used convert.py to get yolov5n.rknn >> then compiled example and got the c code compiled then when i ran it it gave me this error
Code: Select all
[root@luckfox rknn_yolov5_demo]# ./rknn_yolov5_demo model/yolov5.rknn model/bus.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, 36], n_elems=230400, size=230400, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=1, name=343, n_dims=4, dims=[1, 40, 40, 36], n_elems=57600, size=57600, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=2, name=345, n_dims=4, dims=[1, 20, 20, 36], n_elems=14400, size=14400, 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
Now i will try to load model and image
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
src width=640 height=640 fmt=0x1 virAddr=0x0xa626c000 fd=11
dst width=640 height=640 fmt=0x1 virAddr=0x(nil) fd=3
src_box=(0 0 639 639)
dst_box=(0 0 639 639)
color=0x72
rga_api version 1.10.1_[0]
rknn_run
Segmentation fault (core dumped)
In details steps are here
Training Steps
1. Downloaded dataset
Code: Select all
!pip install roboflow
from roboflow import Roboflow
rf = Roboflow(api_key="fpRIiVCaZT7TFnwC1x0Y")
project = rf.workspace("data-drown").project("datn-kmi9v")
version = project.version(1)
dataset = version.download("yolov5")
Code: Select all
!python train.py --img 640 --batch 32 --epochs 10 --data /kaggle/working/yolov5/DATN-1/data.yaml --weights yolov5n.pt
https://wiki.luckfox.com/Luckfox-Pico/L ... -RKNN-Test
4. Tested the folder and attached is the datn_.pt file and datn_.onnx file and yolov5.rknn