Skip to content

Add multilingual PP-OCRv5 model support in text recognition inference #16032

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ea3124
Copy link

@Ea3124 Ea3124 commented Jul 12, 2025

After the 3.1.0 version release, the inference recognition files don't work with multilingual models. I've added support for them.

After Added multilingual PP-OCRv5 model's names, Now It works!

Error

Traceback (most recent call last):
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 896, in <module>
    main(utility.parse_args())
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 858, in main
    text_recognizer = TextRecognizer(args)
                      ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 48, in __init__
    raise ValueError(
ValueError: korean_PP-OCRv5_mobile_rec is not supported. Please check if the model is supported by the PaddleOCR wheel.
Traceback (most recent call last):
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 899, in <module>
    main(utility.parse_args())
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 861, in main
    text_recognizer = TextRecognizer(args)
                      ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 51, in __init__
    raise ValueError(
ValueError: latin_PP-OCRv5_mobile_rec is not supported. Please check if the model is supported by the PaddleOCR wheel.
Traceback (most recent call last):
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 899, in <module>
    main(utility.parse_args())
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 861, in main
    text_recognizer = TextRecognizer(args)
                      ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\khmoon\assign\base\PaddleOCR\tools\infer\predict_rec.py", line 51, in __init__
    raise ValueError(
ValueError: eslav_PP-OCRv5_mobile_rec is not supported. Please check if the model is supported by the PaddleOCR wheel.

After Added

[2025/07/13 00:40:34] ppocr INFO: Predicts of ./ko_pp/00010.png:('여기인가', 0.9998766183853149)
[2025/07/13 01:19:47] ppocr INFO: Predicts of ./ko_pp/latin.png:("l'épaule", 0.9976184368133545)
[2025/07/13 01:21:39] ppocr INFO: Predicts of ./ko_pp/eslav.png:('АБВГ', 0.910905122756958)

Copy link

paddle-bot bot commented Jul 12, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Jul 12, 2025

CLA assistant check
All committers have signed the CLA.

@Ea3124 Ea3124 mentioned this pull request Jul 14, 2025
3 tasks
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