rockchip-linux / rknn-toolkit2

BSD 3-Clause "New" or "Revised" License
828 stars 151 forks source link

Garbage output from rknn_yolo_demo using RKNPU2 runtime #273

Open mdurrani808 opened 5 months ago

mdurrani808 commented 5 months ago

When using a custom model and the rknn_yolo_demo, I get useless outputs. What is the fix for this?

out final.zip

mdurrani808 commented 5 months ago

I am following this tutorial here, https://github.com/rockchip-linux/rknn-toolkit2/tree/master/rknpu2/examples/rknn_yolov5_demo any help would be greatly appreciated.

mdurrani808 commented 5 months ago

./cmake_build/main_test /home/mdurrani808/photon-testing/rknn_jni/src/test/resources/RK3588/note.rknn /home/mdurrani808/photon-testing/rknn_jni/src/test/resources/new.jpg /home/mdurrani808/photon-testing/rkn n_jni/src/test/resources/newww.jpg post process config: box_conf_threshold = 0.25, nms_threshold = 0.45 Loading mode... sdk version: 1.5.2 (c6b7b351a@2023-08-23T15:28:22) driver version: 0.9.2 model input num: 1, output num: 3 index=0, name=images, n_dims=4, dims=[1, 640, 640, 3], n_elems=1228800, size=2457600, w_stride = 640, size_with_stride=2457600, fmt=NHWC, type=FP16, qnt_type=AFFINE, zp=0, scale=1.000000 index=0, name=output0, n_dims=4, dims=[1, 18, 80, 80], n_elems=115200, size=230400, w_stride = 0, size_with_stride=307200, fmt=NCHW, type=FP16, qnt_type=AFFINE, zp=0, scale=1.000000 index=1, name=286, n_dims=4, dims=[1, 18, 40, 40], n_elems=28800, size=57600, w_stride = 0, size_with_stride=76800, fmt=NCHW, type=FP16, qnt_type=AFFINE, zp=0, scale=1.000000 index=2, name=288, n_dims=4, dims=[1, 18, 20, 20], n_elems=7200, size=14400, w_stride = 0, size_with_stride=23040, fmt=NCHW, type=FP16, qnt_type=AFFINE, zp=0, scale=1.000000 model is NHWC input fmt model input height=640, width=640, channel=3 Read /home/mdurrani808/photon-testing/rknn_jni/src/test/resources/new.jpg ... img width = 640, img height = 640 once run use 26.859000 ms loadLabelName /home/mdurrani808/photon-testing/rknn_jni/src/test/resources/coco_80_labels_list.txt cone @ (0 0 640 640) 15621.000000 cone @ (0 0 640 640) 15494.000000 cone @ (0 0 640 640) 15252.000000 cone @ (0 0 640 640) 15252.000000 cone @ (0 0 640 640) 15006.000000 cone @ (0 0 640 640) 14632.000000 cone @ (0 0 640 640) 14384.000000 cone @ (0 0 640 0) 14278.000000 cone @ (0 0 640 640) 14112.000000 cone @ (0 0 640 640) 14012.000000 cone @ (0 0 640 640) 14000.000000 cone @ (0 0 640 640) 13986.000000 cone @ (0 0 640 640) 13640.000000 cone @ (0 0 640 640) 13320.000000 cone @ (508 0 508 640) 13110.000000 cone @ (0 0 640 640) 13080.000000 cone @ (0 0 640 640) 13054.000000 cone @ (0 0 640 640) 12960.000000 cone @ (640 0 640 640) 12954.000000 cone @ (0 640 640 640) 12896.000000 cone @ (0 0 640 640) 12876.000000 cone @ (0 0 640 0) 12827.000000 cone @ (0 0 640 640) 12650.000000 cone @ (0 0 640 640) 12636.000000 cone @ (0 0 640 640) 12480.000000 cone @ (0 0 640 640) 12444.000000 cone @ (0 0 640 0) 12444.000000 cone @ (0 0 640 640) 12321.000000 cone @ (0 0 640 640) 12285.000000 cone @ (0 0 640 640) 12250.000000 cone @ (0 0 640 640) 12198.000000 cone @ (0 0 640 0) 12168.000000 cone @ (0 0 640 640) 11984.000000 cone @ (588 0 640 640) 11904.000000 cone @ (0 0 640 640) 11904.000000 cone @ (0 0 640 640) 11592.000000 cone @ (0 0 640 640) 11526.000000 cone @ (0 180 640 640) 11346.000000 cone @ (0 0 640 640) 11270.000000 cone @ (0 640 640 640) 11250.000000 cone @ (0 0 640 640) 11232.000000 cone @ (0 0 640 640) 11070.000000 cone @ (0 0 640 640) 11009.000000 cone @ (0 0 640 640) 10989.000000 cone @ (0 0 640 640) 10980.000000 cone @ (298 0 640 640) 10864.000000 cone @ (0 0 640 640) 10856.000000 cone @ (0 0 640 640) 10712.000000 cone @ (0 0 640 640) 10622.000000 cone @ (0 0 640 640) 10620.000000 cone @ (0 0 640 640) 10580.000000 cone @ (0 0 640 640) 10414.000000 cone @ (0 0 640 640) 10414.000000 cone @ (492 0 640 640) 10403.000000 cone @ (640 0 640 640) 10384.000000 cone @ (0 0 640 640) 9963.000000 cone @ (0 0 640 640) 9919.000000 cone @ (0 0 640 640) 9918.000000 cone @ (0 0 640 640) 9828.000000 cone @ (0 0 0 640) 9796.000000 cone @ (0 0 0 640) 9744.000000 cone @ (0 0 640 640) 9660.000000 cone @ (0 0 300 640) 9434.000000 cone @ (0 252 0 640) 9408.000000 save detect result to ./out.jpg loop count = 10 , average run 53.669800 ms

jpmag7 commented 1 week ago

@mdurrani808 Did you solve this?

mdurrani808 commented 1 week ago

Yes, I believe it was a model conversion error.