airockchip / rknn_model_zoo

Apache License 2.0
777 stars 157 forks source link

[yolov8s/RK3566] librga fail to get driver version! Compatibility mode will be enabled. #55

Closed how2flow closed 6 months ago

how2flow commented 7 months ago

rga kernel driver version:

cat /sys/kernel/debug/rkrga/driver_version
RGA2 Device Driver: v2.1.0

I exported yolov8s.onnx in https://github.com/airockchip/ultralytics_yolov8 cd ultralytics/engine && yolo mode=export model=yolov8s.pt format=onnx

I converted model (onxx -> rknn) with python3 examples/yolov8/python/convert.py yolov8s.onnx rk3566

Build: ./build-linux.sh -t rk3566 -a aarch64 -d yolov8

Run: ./rknn_yolov8_demo model/yolov8.rknn model/bus.jpg

Log:

load lable ./model/coco_80_labels_list.txt
model input num: 1, output num: 1
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=3, dims=[1, 84, 8400, 0], n_elems=705600, size=705600, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-126, scale=2.550774
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
src width=640 height=640 fmt=0x1 virAddr=0x0x559baf30d0 fd=0
dst width=640 height=640 fmt=0x1 virAddr=0x0x559bc1f0e0 fd=0
src_box=(0 0 639 639)
dst_box=(0 0 639 639)
color=0x72
librga fail to get driver version! Compatibility mode will be enabled.

rga_api version 1.10.0_[2]
rknn_run
write_image path: out.png width=640 height=640 channel=3 data=0x559baf30d0

I changed the rga version.

load lable ./model/coco_80_labels_list.txt
model input num: 1, output num: 1
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=3, dims=[1, 84, 8400, 0], n_elems=705600, size=705600, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-126, scale=2.550774
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
src width=640 height=640 fmt=0x1 virAddr=0x0x55a32f20d0 fd=0
dst width=640 height=640 fmt=0x1 virAddr=0x0x55a341e0e0 fd=0
src_box=(0 0 639 639)
dst_box=(0 0 639 639)
color=0x72
librga fail to get driver version! Compatibility mode will be enabled.

rga_api version 1.9.1_[4]
rknn_run
write_image path: out.png width=640 height=640 channel=3 data=0x55a32f20d0

I want to try again with 1.3.2, but I couldn't find a static library.. Is there something wrong or is the rga version problem correct?

wangty537 commented 6 months ago

same problem

Plwy commented 6 months ago

+1

how2flow commented 6 months ago

same problem

https://github.com/airockchip/ultralytics_yolov8/commit/5b7ddd8f821c8f6edb389aa30cfbc88bd903867b After merging this commitment, I was resolved.