基于Yolov5 v6.0版本的yolon.pt权重文件自定义训练的数据集,转成onnx以后通过AI工具链1.7.5版本mapper工具做的模型转换,根据视频和问的说明已经执行了01 模型检测、02 预处理、03 模型编译,前面三步都已经完成了,执行04 的时候提示错误,异常输出附在内容后面,根据训练模型修改了输入尺寸为640,也替换了预处理的图片,其他的没有修改,请问下这个异常怎么处理?
python3 -u ../../det_inference.py \
--model ${model} \
--image ${infer_image} \
--input_layout ${layout} \
--input_offset ${input_offset}
no display found. Using non-interactive Agg backend
Traceback (most recent call last):
File “../../det_inference.py”, line 71, in
main()
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 829, in __call__
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “../../det_inference.py”, line 67, in main
inference(sess, image, input_layout, input_offset)
File “../../det_inference.py”, line 36, in inference
postprocess(output, model_hw_shape, origin_image)
File “/open_explorer/ddk/samples/ai_toolchain/horizon_model_convert_sample/04_detection/03_yolov5/mapper/postprocess.py”, line 58, in postprocess
85]).transpose([0, 3, 1, 2, 4])
ValueError: cannot reshape array of size 2142000 into shape (1,84,84,3,85)