PaddlePaddle / Paddle2ONNX

ONNX Model Exporter for PaddlePaddle
Apache License 2.0
710 stars 163 forks source link

中文表格识别模型ch_ppstructure_mobile_v2.0_SLANet_infer,不支持转为onnx格式吗? #1335

Open greatliu opened 1 month ago

greatliu commented 1 month ago

Search before asking

Bug

您好。我想把表格识别模型转为onnx来部署。paddle2onnx中3个例子都可以转换成功, https://github.com/PaddlePaddle/PaddleOCR/tree/main/deploy/paddle2onnx

但是我使用同样方法转换ch_ppstructure_mobile_v2.0_SLANet_infer时,报错。

~/Workspace/PaddleOCR-2.8.1$ paddle2onnx --model_dir ./inference/ch_ppstructure_mobile_v2.0_SLANet_infer --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ./inference/SLANet_onnx/model.onnx --opset_version 11 --enable_onnx_checker True [Paddle2ONNX] Start to parse PaddlePaddle model... [Paddle2ONNX] Model file path: ./inference/ch_ppstructure_mobile_v2.0_SLANet_infer/inference.pdmodel [Paddle2ONNX] Parameters file path: ./inference/ch_ppstructure_mobile_v2.0_SLANet_infer/inference.pdiparams [Paddle2ONNX] Start to parsing Paddle model... [Paddle2ONNX] Oops, there are some operators not supported yet, including while, [ERROR] Due to the unsupported operators, the conversion is aborted.


C++ Traceback (most recent call last):

0 paddle2onnx::Export(char const, char const, char, int, int, bool, bool, bool, bool, bool, char const, char, int, char const, bool*, bool, char**, int)


Error Message Summary:

FatalError: Process abort signal is detected by the operating system. [TimeInfo: Aborted at 1721979100 (unix time) try "date -d @1721979100" if you are using GNU date ] [SignalInfo: SIGABRT (@0x3e8000018fb) received by PID 6395 (TID 0x7c16f51bd480) from PID 6395 ]

已中止 (核心已转储)

我搜索以前的issue,有人说转换成功了,请问是哪里有问题呢?

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

GreatV commented 1 month ago

while 算子在当前版本的paddle2onnx被暂时屏蔽了,可以试试降低paddle2onnx版本。

greatliu commented 1 month ago

while 算子在当前版本的paddle2onnx被暂时屏蔽了,可以试试降低paddle2onnx版本。

我找到别人转好的onnx版本了,先这样,谢谢。

顺道问下,我想把表格识别部署到linux上作为服务使用,是不是onnx就是最优解了? paddleservering不更新了,hub serving提示我不是生产环境,我没找到怎么改成生产环境。

迫不得已我才用onnx部署。

GreatV commented 1 month ago

@greatliu onnx部署的生态非常成熟,可以用onnx来部署。

greatliu commented 1 month ago

@greatliu onnx部署的生态非常成熟,可以用onnx来部署。

谢谢

phphappy commented 1 month ago

while 算子在当前版本的paddle2onnx被暂时屏蔽了,可以试试降低paddle2onnx版本。

我找到别人转好的onnx版本了,先这样,谢谢。

顺道问下,我想把表格识别部署到linux上作为服务使用,是不是onnx就是最优解了? paddleservering不更新了,hub serving提示我不是生产环境,我没找到怎么改成生产环境。

迫不得已我才用onnx部署。

哪个版本好用?