-
Notifications
You must be signed in to change notification settings - Fork 45
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
PaddleOCR转换错误 #690
Comments
Atlas 300I Model 3010下的310,可能对动态shape转换支持不完全。可以尝试以下方法
详细见 https://github.com/horcham/mindocr/blob/main/docs/cn/inference/convert_tutorial.md |
可能det模型检测结果存在问题,可能因为310对动态shape存在不适配,但对ppocr的模型静态或分档后,图片放缩到对应shape喂入网络,导致检测效果不好。可以尝试下用dbnet_resnet50等自有模型,或ch_pp_det_OCRv4,单独跑det看看效果.
如使用dbnet_resnet50跑模型,则config文件用 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
尝试将Paddleocr转到ascend 301上转换错误:
一、相关环境信息
服务器:华为鲲鹏服务器;
OS:ubuntu20.04;
加速卡:Atlas 300I Model 3010(含4块Ascend 301);
mindspore-lite: 2.2.13
CANN:7.0.0.beta1
固件与驱动:1.0.22.alpha(A300-3010-npu-firmware_7.1.0.3.220.run,A300-3010-npu-driver_23.0.0_linux-aarch64.run)
二、问题描述:
1、直接使用paddle2mindir.sh脚本
ppocr_model_name设为ch_PP-OCRv4, ch_PP-OCRv4_server均报错,
报错信息为:EZ3002: Optype [Conv2D] of Ops kernel [AIcoreEngine] is unsupported. Reason: Dynamic shape is not supported on this chip!.
2、不使用paddle2mindir.sh脚本,分别下载ch_ppocr_mobile_v2.0_cls_infer、ch_PP-OCRv4_det_infer、ch_PP-OCRv4_rec_infer,然后分别进行onnx格式转换及Lite MindIR格式转换;
1)、使用paddle2onnx 转换onnx文件均能成功;
2)、使用converter_lite 转换Lite MindIR格式文件时
--ch_ppocr_mobile_v2.0_cls_infer、ch_PP-OCRv4_det_infer通过将config.txt中的格式说明改为[ascend_context](paddle2mindir.sh脚本中为[acl_build_options]动态shape格式),无论是静态shape还是动态shape分档,都可以成功
--ch_PP-OCRv4_rec_infer中,config.txt中的格式改成静态shape或者动态shape分档模式,依旧报错:
[ERROR] ME(173355,fffface8f010,converter_lite):2024-04-12-09:43:08.099.512 [mindspore/ccsrc/cxx_api/model/acl/model_converter.cc:155] BuildAirModel] Call aclgrphBuildModel fail: EE1001: The argument is invalid.Reason: rtGetDevMsg execute failed, reason=[context pointer null]
Solution: 1.Check the input parameter range of the function. 2.Check the function invocation relationship.
TraceBack (most recent call last):
[Node:p2o.Reshape.67_ascend_mbatch_batch_0] Check shape failed, as x-input shape is [1,65,360], with shape size(23400), is input dynamic shape[0]. Shape-input shape is [5], with shape size(5). Y-output shape inferred is [0,65,3,8,15], with shape size(0).[FUNC:ReshapeInfer][FILE:array_ops.cc][LINE:1717]
Call InferShapeAndType for node:p2o.Reshape.67_ascend_mbatch_batch_0(Reshape) failed[FUNC:Infer][FILE:infershape_pass.cc][LINE:119]
process pass InferShapePass on node:p2o.Reshape.67_ascend_mbatch_batch_0 failed, ret:4294967295[FUNC:RunPassesOnNode][FILE:base_pass.cc][LINE:571]
build graph failed, graph id:0, ret:1343242270[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615]
ctx is NULL![FUNC:GetDevErrMsg][FILE:api_impl.cc][LINE:4541]
The argument is invalid.Reason: rtGetDevMsg execute failed, reason=[context pointer null]
[ERROR] ME(173355,fffface8f010,converter_lite):2024-04-12-09:43:09.292.674 [mindspore/ccsrc/cxx_api/model/acl/model_converter.cc:238] operator()] Convert model from MindIR to OM failed
[ERROR] ME(173355,fffface8f010,converter_lite):2024-04-12-09:43:09.293.737 [mindspore/ccsrc/cxx_api/model/model_converter_utils/multi_process.cc:140] ChildProcess] Child process process failed
[WARNING] ME(173331,ffff9e5119c0,converter_lite):2024-04-12-09:43:09.320.495 [mindspore/ccsrc/cxx_api/model/model_converter_utils/multi_process.cc:228] HeartbeatThreadFuncInner] Peer stopped
[ERROR] ME(173331,fffface8f010,converter_lite):2024-04-12-09:43:09.321.148 [mindspore/ccsrc/cxx_api/model/acl/model_converter.cc:218] operator()] Receive result model from child process failed
[ERROR] ME(173331,fffface8f010,converter_lite):2024-04-12-09:43:09.323.533 [mindspore/ccsrc/cxx_api/model/model_converter_utils/multi_process.cc:118] ParentProcess] Parent process process failed
[ERROR] ME(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.503 [mindspore/ccsrc/cxx_api/model/acl/model_converter.cc:251] LoadMindIR] Convert MindIR model to OM model failed
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.610 [mindspore/lite/tools/converter/adapter/acl/src/acl_pass_impl.cc:805] ConvertGraphToOm] Model converter load mindir failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.646 [mindspore/lite/tools/converter/adapter/acl/src/acl_pass_impl.cc:854] BuildGraph] Convert graph to om failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.708 [mindspore/lite/tools/converter/adapter/acl/src/acl_pass_impl.cc:1112] Run] Build graph failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.753 [mindspore/lite/tools/converter/adapter/acl/acl_pass.cc:42] Run] Acl pass impl run failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.788 [mindspore/lite/tools/converter/anf_transform.cc:469] RunConvertPass] Acl pass failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.840 [mindspore/lite/tools/converter/anf_transform.cc:662] RunPass] Run convert pass failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.329.870 [mindspore/lite/tools/converter/anf_transform.cc:766] TransformFuncGraph] Proc online transform failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.330.121 [mindspore/lite/tools/converter/anf_transform.cc:858] Transform] optimizer failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.330.159 [mindspore/lite/tools/converter/converter_funcgraph.cc:489] Optimize] Transform anf graph failed.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.330.216 [mindspore/lite/tools/converter/converter.cc:1030] HandleGraphCommon] Optimize func graph failed: -2 NULL pointer returned.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.330.260 [mindspore/lite/tools/converter/converter.cc:980] Convert] Handle graph failed: -2 NULL pointer returned.
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.330.292 [mindspore/lite/tools/converter/converter.cc:1168] RunConverter] Convert model failed
[ERROR] LITE(173331,fffface8f010,converter_lite):2024-04-12-09:43:10.330.332 [mindspore/lite/tools/converter/cxx_api/converter.cc:374] Convert] Convert model failed, ret=NULL pointer returned.
ERROR [mindspore/lite/tools/converter/converter_lite/main.cc:104] main] Convert failed. Ret: NULL pointer returned.
Convert failed. Ret: NULL pointer returned.
The text was updated successfully, but these errors were encountered: