PaddleOCR/latest/version3.x/pipeline_usage/OCR #15771
Replies: 30 comments 7 replies
-
|
/Users/home/Downloads/汤用彤 - 汉魏两晋南北朝佛教史 2.pdf OCR |
Beta Was this translation helpful? Give feedback.
-
|
Can you OCR a File? |
Beta Was this translation helpful? Give feedback.
-
|
I need to align my image's resolution (dpi) and dimensions (width & height pixels) with the demo image, general_ocr_002.png, so that it works. |
Beta Was this translation helpful? Give feedback.
-
|
虽然你这里声明ocr.predict是结果列表,但是如果走的piepline那个逻辑,predict产生的output却是generator |
Beta Was this translation helpful? Give feedback.
-
|
你好,我在使用最新cpu 的orc版本 ,使用单例模式的话第一次成功 第二次必然会失败 第三次就会成功 这样往复的 似乎是有资源没释放使用完 |
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.
-
|
模型路径中为什么不能包含中文 |
Beta Was this translation helpful? Give feedback.
-
|
PaddleOcr实例化也是不能包含中文
***@***.***> 在 2025年7月10日 周四 10:19 写道:
ocr实例化的好像可以,走pipeline的好像就不能包含中文,我也遇到了。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
|
paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png |
Beta Was this translation helpful? Give feedback.
-
|
每次使用,都必须初始化一次ocr吗,因为我发现把ocr放在函数外面的话,每次调用接口,第一次都成功,第二次都会失败。 |
Beta Was this translation helpful? Give feedback.
-
|
请问文本检测需要区分语种吗?对应使用不同的模型吗?目前只看到了识别阶段有多语种的模型提供。 |
Beta Was this translation helpful? Give feedback.
-
|
看你的需求来选择不同模型,通过测试选择识别率高的或者速度快的就行
…---- Replied Message ----
| From | ***@***.***> |
| Date | 08/22/2025 14:48 |
| To | PaddlePaddle/PaddleOCR ***@***.***> |
| Cc | joey-bing-614 ***@***.***>,
Comment ***@***.***> |
| Subject | Re: [PaddlePaddle/PaddleOCR] PaddleOCR/latest/version3.x/pipeline_usage/OCR (Discussion #15771) |
另外想要识别某个文本图像是属于哪个语种,可以有什么方法?
—
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.
-
Beta Was this translation helpful? Give feedback.
-
|
请问多语言调用服务如何指定lang具体某种语言呢? |
Beta Was this translation helpful? Give feedback.
-
|
感谢🙏
…---- Replied Message ----
| From | ***@***.***> |
| Date | 09/15/2025 18:44 |
| To | PaddlePaddle/PaddleOCR ***@***.***> |
| Cc | joey-bing-614 ***@***.***>,
Comment ***@***.***> |
| Subject | Re: [PaddlePaddle/PaddleOCR] PaddleOCR/latest/version3.x/pipeline_usage/OCR (Discussion #15771) |
我也遇到了同样问题,目前看到的原因是由于多线程调用OCR 引擎导致的。解决方案有两个:
在引擎实例上添加 enable_mkldnn=False参数,这可以避免隔一条OCR就失败的问题,但会导致OCR处理时间增加50%左右。
ocr_engine = PaddleOCR(
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_textline_orientation=False,
text_detection_model_name="PP-OCRv5_mobile_det",
text_recognition_model_name="PP-OCRv5_mobile_rec",
lang="cn",
cpu_threads=8,
enable_mkldnn=False #添加该参数
)
不添加 enable_mkldnn=False 参数,采取单线程处理OCR调用。既可以避免问题又不会影响OCR速度。
主要区别
多线程方式:
使用QThread创建独立线程处理每个OCR任务
通过信号和槽机制在主线程和工作线程之间传递数据
存在多线程环境下PaddleOCR的兼容性问题
单线程方式:
在主线程中顺序处理所有OCR任务
直接调用函数处理,避免了信号和槽机制
通过递归调用实现顺序处理
避免了多线程环境下的兼容性问题
最后的测试结果如下:
添加 enable_mkldnn=False 时:
无论单线程还是多线程调用都不会出现OCR失败的问题,但OCR时间相对没有这个参数会增加50%
不添加 enable_mkldnn=False 时:
单线程调用不会出现OCR失败的问题,OCR时间正常。
多线程调用一定会出现隔一条就出现OCR失败的问题。
—
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.
-
|
我按着开发流程来的,命令只做了模型的修改,无论是v5还是v4,都会报断言错误 Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
-
“API参考”中的文档只有/ocr这一个请求的说明,但是看NodeJS示例中又有个http://localhost:8080/layout-parsing请求,能否给个完整的服务部署后的http接口文档? |
Beta Was this translation helpful? Give feedback.
-
|
WARNING: Logging before InitGoogleLogging() is written to STDERR ,初始化PaddleOCR实例后,影响了所有原来正常的日志正常输出,请问这个问题有好的解决方法么 |
Beta Was this translation helpful? Give feedback.
-
|
3.2.0版本,PP-OCRv5 本地模型, 在三台机器上跑了同一张图 分辨率640x480 机器2 机器3 python 环境是 3.13 初始化用的代码: 识别: |
Beta Was this translation helpful? Give feedback.
-
|
在笔记本上跑最好用PP-OCRv5_mobile_rec 和 OCRv5_mobile_det。速度快很多。server 模型适用于服务器配置的。
这是我在笔记本上跑mobile 模型的性能数据
硬件配置 - 该配置约为2018年中端笔记本的配置。工具运行在机械硬盘上,输入输5出文件也位于机械硬盘上
- 处理器: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
- 内存: 16.0 GB
- 存储: 466 GB HDD 5400RPM
- 识别速度 - 纯中文字幕识别50张图片(分辨率 1280 x 60)耗时约13秒,100张图片耗时约27秒。性能表现一致且平稳
- 内存占用 - 运行中占用内存峰值约800MB左右
- CPU占用 - 识别过程中CPU占用率在90%以上。
我的引擎初始化代码:
```
default_text_det_limit = load_text_det_limit()
# 获取模型文件的正确路径
det_model_dir = get_resource_path("ocrmodels/PP-OCRv5_mobile_det")
rec_model_dir = get_resource_path("ocrmodels/PP-OCRv5_mobile_rec")
ocr_engine = PaddleOCR(
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_textline_orientation=False,
text_detection_model_name="PP-OCRv5_mobile_det",
text_recognition_model_name="PP-OCRv5_mobile_rec",
lang="cn",
#lang="chinese_cht",
#lang="en"
cpu_threads=8,
text_det_limit_side_len=default_text_det_limit,
text_detection_model_dir=det_model_dir,
text_recognition_model_dir=rec_model_dir,
text_det_limit_type="max"
# 移除enable_mkldnn=False以测试是否能正常运行
)
```
…________________________________
From: qboyjun ***@***.***>
Sent: Friday, October 3, 2025 12:05:16 AM
To: PaddlePaddle/PaddleOCR ***@***.***>
Cc: ezatgz ***@***.***>; Comment ***@***.***>
Subject: Re: [PaddlePaddle/PaddleOCR] PaddleOCR/latest/version3.x/pipeline_usage/OCR (Discussion #15771)
3.2.0版本,PP-OCRv5 本地模型, 在三台机器上跑了同一张图 分辨率640x480
都在CPU下跑
机器1:
AMD 7840HS 笔记本
识别大概1秒多
机器2
INTEL 12700KF 台式机
识别将近用了40秒, 关闭小核心之后 识别用了2~3秒 , 比7840HS笔记本慢
机器3
intel Ultra5 125H 笔记本
这台机器关不了小核, 识别花了60秒 +
python 环境是 3.13
有知情大佬知道是什么情况么?
初始化用的代码:
self._paddle_ocr = PaddleOCR(
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_textline_orientation=False,
lang="ch",
ocr_version="PP-OCRv5",
text_detection_model_name="PP-OCRv5_server_det",
text_recognition_model_name="PP-OCRv5_server_rec",
text_detection_model_dir=os.path.abspath("./tools/paddleocr_models/PP-OCRv5_server_det"),
text_recognition_model_dir=os.path.abspath("./tools/paddleocr_models/PP-OCRv5_server_rec")
)
识别:
result = self._paddle_ocr.ocr(screenshot)
―
Reply to this email directly, view it on GitHub<#15771 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BEU5JRMANAHVCIPRHNFZNBL3VVELZAVCNFSM6AAAAAB7S5TMHKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINJXGU3TGMY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
有version3.x的yaml配置文件的参数说明嘛? |
Beta Was this translation helpful? Give feedback.
-
|
return_word_box这个参数是舍弃了吗 |
Beta Was this translation helpful? Give feedback.
-
|
java语言 走的接口 http://127.0.0.1:8080/ocr ,响应链接超时 Read timed out申请情况。 |
Beta Was this translation helpful? Give feedback.
-
|
导出的推理模型 json、yml、pdiparams三个文件如何导出成onnx模型呢? |
Beta Was this translation helpful? Give feedback.
-
|
[Paddle2ONNX] Start to parse PaddlePaddle model...
[Paddle2ONNX] Model file path: D:\PaddleOCR\ocrAPP\myModels\det_ppocrv5_infer_1121\inference.json
[Paddle2ONNX] Parameters file path: D:\PaddleOCR\ocrAPP\myModels\det_ppocrv5_infer_1121\inference.pdiparams
[Paddle2ONNX] Start to parsing Paddle model...
[Paddle2ONNX] Failed to parse paddlepaddle model from read content.
[Paddle2ONNX] Failed to load program of PaddlePaddle model.
[Paddle2ONNX] Paddle model parsing failed.
[Paddle2ONNX] Paddle model convert failed.
Paddle2ONNX conversion succeeded
Copied D:\PaddleOCR\ocrAPP\myModels\det_ppocrv5_infer_1121\inference.yml to output\detONNX1202\inference.yml
Done
导出显示上面failed,这个是失败了吗?
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2025年12月2日(星期二) 晚上8:46
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [PaddlePaddle/PaddleOCR] PaddleOCR/latest/version3.x/pipeline_usage/OCR (Discussion #15771)
json文件的模型可以使用paddlex转onnx,参考文档如下:https://www.paddleocr.ai/main/version3.x/deployment/obtaining_onnx_models.html
—
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.
-
|
如何部署到 Android 上去,在线求助 |
Beta Was this translation helpful? Give feedback.
-
|
问题描述如下: 问题解决需求: |
Beta Was this translation helpful? Give feedback.
-
|
Hi everyone. I've train the recognition model. The parameter when training is good. But when I try to combine with detection model that I train. And put in in the module PaddleOCR. The model performed so bad. |
Beta Was this translation helpful? Give feedback.
-
|
请问下, |
Beta Was this translation helpful? Give feedback.
-
|
请问,我看上面的文档里面,ocr.predict的结果里面写着是有dt_scores的,但是我实际推理一张图片在结果中没有看到dt_scores,但是我现在需要检测模型的置信度分数,该怎么办? |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
PaddleOCR/latest/version3.x/pipeline_usage/OCR
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/latest/version3.x/pipeline_usage/OCR.html
Beta Was this translation helpful? Give feedback.
All reactions