Getting "Model name mismatch" when I try to use "eslav_PP-OCRv5_mobile_rec" instead of "PP-OCRv5_server_rec" even though it's the official one #16343
Unanswered
TryingToMakeDo
asked this question in
Q&A
Replies: 0 comments
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.
-
import os
from paddleocr import PaddleOCR
home_dir = os.path.expanduser("~")
det_model_path = os.path.join(home_dir, ".paddlex", "official_models", "PP-OCRv5_server_det")
rec_model_path = os.path.join(home_dir, ".paddlex", "official_models", "PP-OCRv5_server_rec")
ocr = PaddleOCR(
text_detection_model_dir=det_model_path,
text_recognition_model_dir=rec_model_path,
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_textline_orientation=False
)
result = ocr.predict(
input="4.png")
for res in result:
res.print()
res.save_to_img("output")
res.save_to_json("output")
I'm running the following code and it works but when I change PP-OCRv5_server_rec with eslav_PP-OCRv5_mobile_rec it raises a name mismatch exception. The eslav itself was downloaded when I set
lang='ru'
so it's the official version. I want to modify eslav to add extra cyrillic characters for my language so any pointers on how to do that in addition to modifying the yaml and character dictionary would be helpful.Beta Was this translation helpful? Give feedback.
All reactions