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

PP-OCRv4_server_det 模型转onnx格式失败 #1475

Open
Longdexin opened this issue Jan 3, 2025 · 7 comments
Open

PP-OCRv4_server_det 模型转onnx格式失败 #1475

Longdexin opened this issue Jan 3, 2025 · 7 comments

Comments

@Longdexin
Copy link

Please fill in the information below so that we can solve the problem quickly, Thanks !

Describe the bug

/home/longdexin/python-venvs/paddle/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:686: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
  warnings.warn(warning_message)
[Paddle2ONNX] Start to parse PaddlePaddle model...
[Paddle2ONNX] Model file path: ./inference.pdmodel
[Paddle2ONNX] Parameters file path: ./inference.pdiparams
[Paddle2ONNX] Start to parsing Paddle model...
[Paddle2ONNX] Oops, there are some operators not supported yet, including isnan_v2,
[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, paddle2onnx::CustomOp*, int, 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 1735875136 (unix time) try "date -d @1735875136" if you are using GNU date ***]
  [SignalInfo: *** SIGABRT (@0x3e80001cfef) received by PID 118767 (TID 0x74604816e080) from PID 118767 ***]

已中止 (核心已转储)

Informations (please complete the following information):

  • Inference engine for deployment: CPU
  • Why convert to onnx:PP-OCRv4_server版本模型效果很好
  • Paddle2ONNX Version: 13.1
  • Email/Wechat/Phone:

Screenshots
image

Additional context

paddle2onnx            1.3.1
paddleclas             2.6.0
paddleocr              2.9.1
paddlepaddle           3.0.0b2
@GreatV
Copy link
Collaborator

GreatV commented Jan 3, 2025

这应该早就修复了,使用PaddleOCR仓库导一下试试

@Longdexin
Copy link
Author

@GreatV 好的,感谢

@Longdexin
Copy link
Author

Longdexin commented Jan 3, 2025

@GreatV 你好,git clone了PaddleOCR main分支的代码,使用pip install -e . 命令安装,发现跟之前报错一样

~/.paddlex/official_models/PP-OCRv4_server_det$ pip list |grep paddle
paddle2onnx            1.3.1
paddleclas             2.6.0
paddleocr              2.9.0.dev173+ga28196c00 /home/longdexin/PaddleOCR
paddlepaddle           3.0.0b2

@GreatV
Copy link
Collaborator

GreatV commented Jan 3, 2025

重新导静态图了吗

@Longdexin
Copy link
Author

哦,没有,这个导静态图,具体怎么操作呢

@GreatV
Copy link
Collaborator

GreatV commented Jan 3, 2025

参考这里把你训练完成的动态图转成静态图 https://paddlepaddle.github.io/PaddleOCR/latest/ppocr/infer_deploy/python_infer.html#inference

@Longdexin
Copy link
Author

Longdexin commented Jan 3, 2025

@GreatV 非常感谢您的帮助。
看了文档,我要转的模型应该本身就是静态图模型。
我把~/.paddlex/official_models/PP-OCRv4_server_det目录的原有模型文件删除了,重新运行产线代码,自动从 https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b2/PP-OCRv4_server_det_infer.tar 下载了新的模型文件,经测试,可以成功转为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

2 participants