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

fix onnx in latexocr #14909

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liuhongen1234567
Copy link
Contributor

  1. paddle.multinomial 在onnxruntime 中存在bug,使用paddle.argmax替换,经验证精度符合预期
  2. albumentations默认装albucore=0.24 会报错,将其降级

Copy link

paddle-bot bot commented Mar 20, 2025

Thanks for your contribution!

@GreatV
Copy link
Collaborator

GreatV commented Mar 20, 2025

image
这会导致numpy不能安装大于2.0的版本

@liuhongen1234567
Copy link
Contributor Author

liuhongen1234567 commented Mar 20, 2025

image 这会导致numpy不能安装大于2.0的版本

这个有冲突好像是albumentation的冲突不是albucore==0.0.16的冲突,想确认下numpy大于2的必要性?另外,您那边安装paddleocr的时候后,使用不会报mportError: cannot import name 'preserve_channel_dim' from 'albucore.utils' (/root/anaconda3/envs/paddle_latest/lib/python3.10/site-packages/albucore/utils.py) 这个错误吗?
image

@GreatV
Copy link
Collaborator

GreatV commented Mar 20, 2025

numpy 大于2.0不是必须的,但是最好也不应固定版本。我只安装paddleocr的话不会报错。

@liuhongen1234567
Copy link
Contributor Author

liuhongen1234567 commented Mar 20, 2025

numpy 大于2.0不是必须的,但是最好也不应固定版本。我只安装paddleocr的话不会报错。

我这边单独安装也不会报错,不过使用公式推理时报错,要不我把albucore==0.0.16移到公式识别那个requirement里吧。这个主要是albumentation要与albucore版本采用默认方式匹配不上,如果指定albumentation==2.0以上可以支持numpy>2,但是也是把numpy限制死了

@GreatV
Copy link
Collaborator

GreatV commented Mar 20, 2025

@liuhongen1234567
Copy link
Contributor Author

这确实是一个比较常见的问题,最新版本还是会报这个错误吗,如果还是这样,那就先这样直接限制版本吧。

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

Successfully merging this pull request may close these issues.

2 participants