为什么使用paddleocr.PaddleOCR和paddleocr.TextDetection预测同一张图片会得到不同的文本框 #15705
Unanswered
lin-contextere
asked this question in
Q&A
Replies: 1 comment 2 replies
-
您好,OCR产线中的文本检测并不是默认配置,详细可参考 https://github.com/PaddlePaddle/PaddleX/blob/b592f3760d815a245358989c15c08b82bcf50162/paddlex/configs/pipelines/OCR.yaml#L25 。文本检测模块的默认配置可以通过下载推理模型,查看inference.yaml 获取 |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
我是用paddleocr.PaddleOCR和paddleocr.TextDetection预测同一张图片,两种方法我都用的默认设置,在检测部分,两种方法应该都是用的'PP-OCRv5_server_det'模型,但是两种方法会得到不同的文本框。我想问一下是两种方法的默认模型参数设置不一样吗?如果是的话,我应该如何查看和比较默认设置?
版本: PaddleOCRv3
复现代码:
from paddleocr import PaddleOCR, TextDetection
ocr = PaddleOCR(
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_textline_orientation=False)
det = TextDetection()
img_path = "0000189.jpg"
ocr_result = ocr.predict(input=img_path)
for res in ocr_result:
res.save_to_img("output")
res.save_to_json(save_path="./output/ocr_res.json")
det_result = det.predict(input=img_path)
for res in det_result:
res.save_to_img("output")
res.save_to_json(save_path="./output/det_res.json")
原图:

OCR结果:

ocr_res.json
Detection结果:

det_res.json
OCR结果包含6个文本框,Detection结果包含3个文本框。
Beta Was this translation helpful? Give feedback.
All reactions