Replies: 2 comments 4 replies
-
根据你的描述,表格识别的文字内容是正确的,但位置错位,导致两行合并成一行。这种情况可能是由以下几个因素导致的: 可能的原因
解决方案1. 调整表格检测模型
2. 进一步优化图片
3. 使用 PP-OCRv3 重新检测
4. 训练自定义数据如果问题仍未解决,可以考虑:
总结
如果你能提供具体的代码和更多测试案例,可能会更容易找到具体原因并优化解决方案。 Response generated by feifei-bot | chatgpt-4o-latest |
Beta Was this translation helpful? Give feedback.
3 replies
-
用paddlex了,不用原本这个了,玩不明白
Zhenpeng Chen
***@***.***
Harbin Institute of Technology
Assistant, IWARR2023
15914240856
…---原始邮件---
发件人: ***@***.***>
发送时间: 2025年3月21日(周五) 中午1:29
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [PaddlePaddle/PaddleOCR] 图片转表格识别文字准确但是位置错位两行合并成一行 (Discussion #14637)
兄弟,解决了没有,我发现表格有换行就会出出错乱的情况
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
图片转表格识别文字准确但是位置错位两行合并成一行,试过各种质量的图片都会出现以上问题
paddle版本如下:
paddleclas 2.6.0
paddleocr 2.9.1
paddlepaddle 2.6.2
代码如下
`import os
import cv2
from paddleocr import PPStructure,draw_structure_result,save_structure_res
table_engine = PPStructure(
show_log=True, # 关闭日志输出
lang='ch', # 设置语言为中文
table=True, # 启用表格识别
ocr=True, # 启用文字识别
layout=True, # 启用版面分析
recovery=True, # 启用版面恢复, # 不启用版面恢复(如果不需要)
structure_version='PP-StructureV2', # 表格结构化模型版本
)
input_path = r"photo/test.png"
output_folder = r"output"
if not os.path.exists(output_folder):
os.makedirs(output_folder)
img = cv2.imread(input_path)
result = table_engine(img)
save_structure_res(result, output_folder, os.path.basename(input_path).split('.')[0])
from PIL import Image
font_path = '../doc/fonts/simfang.ttf' # PaddleOCR下提供字体包
image = Image.open(input_path).convert('RGB')
im_show = draw_structure_result(image, result, font_path=font_path)
im_show = Image.fromarray(im_show)
im_show.save(os.path.join(output_folder, 'result.jpg'))`
Beta Was this translation helpful? Give feedback.
All reactions