Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用官方文字cls模型转onnx正常再转rknn报错 #2567

Open
Zomcxj opened this issue Nov 26, 2024 · 5 comments
Open

使用官方文字cls模型转onnx正常再转rknn报错 #2567

Zomcxj opened this issue Nov 26, 2024 · 5 comments
Assignees

Comments

@Zomcxj
Copy link

Zomcxj commented Nov 26, 2024

  • 【系统平台】: Linux x64(Ubuntu 18.04)
  • 【编译语言】:Python(3.6)

python export.py --config_path config/ppocrv3_cls.yaml --target_platform rk3588
{'mean': [[127.5, 127.5, 127.5]], 'std': [[127.5, 127.5, 127.5]], 'model_path': './onnx/ch_ppocr_mobile_v2.0_cls_infer.onnx', 'outputs_nodes': None, 'do_quantization': False, 'dataset': None, 'output_folder': './ch_ppocr_mobile_v2.0_cls_infer'}
W init: rknn-toolkit2 version: 1.5.0+1fa95b5c
E load_onnx: Catch exception when loading onnx model: /home/cxj/cxj/CPP/PPOCR/Base/rockchip/rknpu2_tools/onnx/ch_ppocr_mobile_v2.0_cls_infer.onnx!
E load_onnx: Traceback (most recent call last):
E load_onnx: File "rknn/api/rknn_base.py", line 1382, in rknn.api.rknn_base.RKNNBase.load_onnx
E load_onnx: File "rknn/api/rknn_base.py", line 658, in rknn.api.rknn_base.RKNNBase._create_ir_and_inputs_meta
E load_onnx: File "rknn/api/ir_graph.py", line 58, in rknn.api.ir_graph.IRGraph.init
E load_onnx: File "rknn/api/ir_graph.py", line 503, in rknn.api.ir_graph.IRGraph.rebuild
E load_onnx: File "/home/cxj/anaconda3/envs/rknn/lib/python3.6/site-packages/onnx/checker.py", line 106, in check_model
E load_onnx: C.check_model(protobuf_string)
E load_onnx: onnx.onnx_cpp2py_export.checker.ValidationError: Field 'shape' of type is required but missing.
W If you can't handle this error, please try updating to the latest version of the toolkit2 and runtime from:
https://eyun.baidu.com/s/3eTDMk6Y (Pwd: rknn) Path: RK_NPU_SDK / RK_NPU_SDK_1.X.0 / develop /
If the error still exists in the latest version, please collect the corresponding error logs and the model,
convert script, and input data that can reproduce the problem, and then submit an issue on:
https://redmine.rock-chips.com (Please consult our sales or FAE for the redmine account)
Traceback (most recent call last):
File "export.py", line 52, in
assert ret == 0, "Load model failed!"
AssertionError: Load model failed!

@Zomcxj
Copy link
Author

Zomcxj commented Dec 2, 2024

使用Paddle2ONNX\tools\onnx\onnx_infer_shape.py即可解决报错

@x53151231
Copy link

使用Paddle2ONNX\tools\onnx\onnx_infer_shape.py即可解决报错

请问Paddle2ONNX\tools\onnx\onnx_infer_shape.py在哪里呢,没找到

@x53151231
Copy link

我也也到了同样的问题,请问如何解决的?

@Zomcxj
Copy link
Author

Zomcxj commented Dec 9, 2024

我也也到了同样的问题,请问如何解决的?
https://github.com/PaddlePaddle/Paddle2ONNX/tree/develop/tools/onnx

@x53151231
Copy link

我也也到了同样的问题,请问如何解决的?
https://github.com/PaddlePaddle/Paddle2ONNX/tree/develop/tools/onnx

问题已解决,非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants