rockchip-linux / rknn-toolkit

BSD 3-Clause "New" or "Revised" License
771 stars 175 forks source link

rknn-toolkit-1.7.3转换成rv1126,模型能够转成功,后面对图片进行推理的时候报错 #411

Open Gitxiaozhu-oss opened 8 months ago

Gitxiaozhu-oss commented 8 months ago

环境介绍:使用的是yolov5 7.0版本,自己训练的模型。 会卡在--> Running model这一步很长时间,大概十来分钟,然后就报错下面错误了,求大佬指点,谢谢 --> Export RKNN model --> Init runtime environment librknn_runtime version 1.7.3 (5047ff8 build: 2022-08-13 12:11:22 base: 1131) done Traceback (most recent call last): File "test.py", line 297, in input1_data = input1_data.reshape([3,-1]+list(input1_data.shape[-2:])) ValueError: cannot reshape array of size 409600 into shape (3,newaxis,40,40)

eRaul commented 8 months ago

环境介绍:使用的是yolov5 7.0版本,自己训练的模型。 会卡在--> Running model这一步很长时间,大概十来分钟,然后就报错下面错误了,求大佬指点,谢谢 --> Export RKNN model --> Init runtime environment librknn_runtime version 1.7.3 (5047ff8 build: 2022-08-13 12:11:22 base: 1131) done Traceback (most recent call last): File "test.py", line 297, in input1_data = input1_data.reshape([3,-1]+list(input1_data.shape[-2:])) ValueError: cannot reshape array of size 409600 into shape (3,newaxis,40,40)

从这个日志看,你用的是模拟器。建议使用开发板进行连板评估。另外,你的模型的输出shape似乎跟demo现有后处理是不一样的,你最好先确认下你的模型中物体的类别是否是跟demo中的类别一样,有可能是这个原因导致后处理中reshape失败了。