-
Notifications
You must be signed in to change notification settings - Fork 226
Mathematical proofs in ArXiv papers recognized by OCR have appeared with irrelevant Chinese. #142
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
Comments
Initalize it with these configs: import os
from pix2text import Pix2Text
text_formula_config = dict(
languages=('en', ), # 设置识别的语言
text=dict(
rec_model_name='en_PP-OCRv3',
rec_model_backend='onnx',
),
)
total_config = {
'layout': {'scores_thresh': 0.45},
'text_formula': text_formula_config,
}
p2t = Pix2Text.from_config(total_configs=total_config) |
Check the logs printed during model initialization to see if the model 'en_PP-OCRv3' is really being used. Judging from your result, it seems that this configuration is not effective. If it is not effective, you can try the following initialization code: import os
from pix2text import Pix2Text
text_formula_config = dict(
languages=('en', ),
text=dict(
rec_model_name='en_PP-OCRv3',
rec_model_backend='onnx',
cand_alphabet=None, # NOTE: must add this line
),
)
total_config = {
'layout': {'scores_thresh': 0.45},
'text_formula': text_formula_config,
}
p2t = Pix2Text.from_config(total_configs=total_config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Error screenshot
Code snipp
Qeustion
Are Chinese and English models separate or a single model?
What parameters or models can be adjusted to achieve better results?
Will paid models definitely avoid this situation?
The text was updated successfully, but these errors were encountered: