PaddleOCR/main/en/version3.x/module_usage/text_recognition #15712
Replies: 8 comments 11 replies
-
I want training model with new language, have a tutorial step-by-step to do it? |
Beta Was this translation helpful? Give feedback.
-
Good afternoon, I have completed the PP-OCRv4_server_rec model, exported it to the inference format, and when trying to use the model through the python API (PaddleOCR method), the error "AssertionError: Model name mismatch, please input the correct model dir.." Why can such an error occur? The PP-OCRv4_server_rec model is specified in the yml configuration files. |
Beta Was this translation helpful? Give feedback.
-
Hello, I have trained with my dataset and my custom dictionary file, specifically vi_dict in PP-OCRv5_server_rec, but I couldn't find a way to pass the path to my dictionary file during prediction, like the rec_char_dict_path parameter in OCRv4. How can I use my dictionary file for prediction? |
Beta Was this translation helpful? Give feedback.
-
PaddleOCR 3.1 has been released, featuring the new PP-OCRv5 multilingual text recognition model. It supports 37 languages including French, Spanish, Portuguese, Russian, Korean, and more, achieving an average recognition accuracy improvement of over 30%. Welcome to try it out! |
Beta Was this translation helpful? Give feedback.
-
Hello, the training data for PaddleOCR is internal and will not be publicly available. If you need to use it, you can upload the data to the OCR no-code pipeline in AI Studio , where there is a fusion factor parameter that allows for training by mixing original data.
鸿飞万里
***@***.***
…------------------ 原始邮件 ------------------
发件人: "Albert Nathanael ***@***.***>;
发送时间: 2025年7月16日(星期三) 中午11:11
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [PaddlePaddle/PaddleOCR] PaddleOCR/main/en/version3.x/module_usage/text_recognition (Discussion #15712)
Hi PaddleOCR team,
I want to fine-tune the PP-OCRv5 mobile recognition model with my own scanned document dataset.
Is the original training data list (e.g., train_data.txt and images/labels) for PP-OCRv5 mobile-rec publicly available?
If not, can you recommend public datasets similar to the ones you used for the Latin (English/Indonesian) model?
Thank you!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I’m currently fine-tuning the PP-OCRv5_mobile_rec model on a custom Japanese dataset that includes both handwritten and printed text. I followed the official PaddleOCR pipeline for training and successfully exported the inference model, which generated the following files in my output folder: I then attempted to load this fine-tuned model using the following code: import cv2
from paddleocr import PaddleOCR
import time
recognition_model = 'PP-OCRv5_mobile_rec_finetune_infer'
ocr = PaddleOCR(
text_detection_model_name="PP-OCRv5_mobile_det",
text_recognition_model_name="PP-OCRv5_server_rec",
text_recognition_model_dir=recognition_model,
)
img_path = "images/crop/Screenshot_2025-07-03_crop_6.jpg"
result = ocr.predict(img_path) However, I encountered the following error: ValueError: (InvalidArgument) Type of attribute: strides is not right.
[Hint: Expected attributes.at("strides").dyn_cast<pir::ArrayAttribute>().at(i).isa<pir::Int32Attribute>() == true, but received attributes.at("strides").dyn_cast<pir::ArrayAttribute>().at(i).isa<pir::Int32Attribute>():0 != true:1.] (at paddle\fluid\pir\dialect\operator\ir\pd_op3.cc:24692) Interestingly, if I replace the model folder with the official inference_model (e.g., the original downloaded version), it works fine. Could you please advise what might be causing this issue? Is there any incompatibility between the export format and the runtime, or any specific config I need to adjust after fine-tuning? |
Beta Was this translation helpful? Give feedback.
-
文字识别示例代码中output = model.predict(input="general_ocr_rec_001.png", batch_size=1) 没有关于文本框参数的,需要将det模块识别的文本框结果作为参数传入,参数列表没有这个文本框参数,不知道如何传入 |
Beta Was this translation helpful? Give feedback.
-
Hello. I have trained PP-OCRv5_mobile_rec with my dataset and my custom dictionary file. Then I exported the model using:
But the recognition result differs between uses predict_rec.py and python API:
And
Can you tell me what could have caused this problem? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
PaddleOCR/main/en/version3.x/module_usage/text_recognition
Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/main/en/version3.x/module_usage/text_recognition.html
Beta Was this translation helpful? Give feedback.
All reactions