middle

middle

0个粉丝

1

问答

0

专栏

0

资料

middle  发布于  2023-06-20 23:13:37
采纳率 0%
1个问答
2165

使用rknn_toolkit_v1.7.3将yolov5的onnx转rknn报错

========== parser_config ==========
NPU_VERSION: 1
RK_device_platform: RV1109
input_example: [{‘in_0’: ‘./../../../../../datasets/COCO/val1/coil2_67.jpg’}] …
pre_compile: online
core_mask: 1
config:
target_platform: RV1109
quantized_dtype: asymmetric_affine-u8
quantized_algorithm: normal
optimization_level: 3
mean_values: [[0, 0, 0]]
std_values: [[255, 255, 255]]
mmse_epoch: 3
do_sparse_network: True
output_optimize: 0
batch_size: 100
quantize_input_node: False
merge_dequant_layer_and_output_node: False
force_builtin_perm: False
reorder_channel: 0 1 2
export_rknn:
export_path: ./model_cvt/RV1109_1126/best_RV1109_1126_u8.rknn
verbose: False
dataset: ./../../../../../datasets/COCO/VOC_dataset_1.txt
quantize: True
build:
do_quantization: True
dataset: ./../../../../../datasets/COCO/VOC_dataset_1.txt
model_framework: onnx
load:
model: ./best.onnx
inputs:
in_0:
shape: [3, 640, 640]
mean_values: [0, 0, 0]
std_values: [255, 255, 255]
img_type: RGB
outputs:

export_pre_compile_path: ./model_cvt/RV1109_1126/best_RV1109_1126_u8_precompile.rknn

—-> Create RKNN object
—-> Seting RKNN config
—-> Loading onnx model
W Call onnx.optimizer.optimize fail, skip optimize
W Please confirm that your onnx opsetversion <= 11 (current opsetverison = 12)!!!
E Calc node Conv : /model.0/conv/conv/Conv output shape fail
E Catch exception when loading onnx model: ./best.onnx!
E Traceback (most recent call last):
E File “rknn/base/RKNNlib/onnx_ir/onnx_numpy_backend/shape_inference.py”, line 65, in rknn.base.RKNNlib.onnx_ir.onnx_numpy_backend.shape_inference.infer_shape
E File “rknn/base/RKNNlib/onnx_ir/onnx_numpy_backend/ops/conv.py”, line 49, in rknn.base.RKNNlib.onnx_ir.onnx_numpy_backend.ops.conv.Conv
E ModuleNotFoundError: No module named ‘torch’
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E File “rknn/base/RKNNlib/app/importer/import_onnx.py”, line 118, in rknn.base.RKNNlib.app.importer.import_onnx.Importonnx.run
E File “rknn/base/RKNNlib/converter/convert_onnx.py”, line 115, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init

E File “rknn/base/RKNNlib/converter/convert_onnx.py”, line 1161, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx._shape_inference
E File “rknn/base/RKNNlib/onnx_ir/onnx_numpy_backend/shape_inference.py”, line 70, in rknn.base.RKNNlib.onnx_ir.onnx_numpy_backend.shape_inference.infer_shape
E File “rknn/api/rknn_log.py”, line 323, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Calc node Conv : /model.0/conv/conv/Conv output shape fail
E Please feedback the detailed log file to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
—-> Building
Traceback (most recent call last):
File “../../../../../common/rknn_converter/rknn_convert.py”, line 79, in
convert(config_dict, args)
File “../../../../../common/rknn_converter/rknn_convert.py”, line 19, in convert
rknn = cp.convert()
File “/home/hjh/Downloads/rknn_model_zoo/common/rknn_converter/phase.py”, line 111, in convert
rknn.build(**model_config_dict[‘build’])
File “/home/hjh/Downloads/software/Anaconda3/envs/rknn_py36/lib/python3.6/site-packages/rknn/api/rknn.py”, line 262, in build
inputs = self.rknn_base.net.get_input_layers()
AttributeError: ‘NoneType’ object has no attribute ‘get_input_layers’

我来回答
回答2个
时间排序
认可量排序

Alfred

3个粉丝

0

问答

0

专栏

0

资料

Alfred 2023-06-21 12:13:14
认可0

mean_values: [[0, 0, 0]]
std_values: [[255, 255, 255]]
这个图像的三个通道值的按这分布都越界了吧?是不是看看rknn的默认值?

Alfred

3个粉丝

0

问答

0

专栏

0

资料

Alfred 2023-06-21 12:18:07
认可0

引用 @Alfred “mean_values: [[0, 0,”

我看RKNN一般
mean values=[123.675, 116.28,103.53]
std values=[58.395,57.12,57.375]

无论是什么分布大部分数值应该是在mean-std ~ mean+std之间的

或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区