Skip to content

Conversation

@scyyh11
Copy link
Collaborator

@scyyh11 scyyh11 commented Nov 12, 2025

问题描述:
当OCR文本框跨越多个表格单元格需要拆分时,split_ocr_bboxes_by_table_cells方法只更新了rec_texts列表,但没有同步更新rec_scores列表,导致两者长度不一致。

修复内容:

  • 在split_ocr_bboxes_by_table_cells方法中添加对rec_scores的处理
  • 拆分OCR框时,为每个拆分后的框提取并保存对应的置信度分数
  • 未拆分时,保留原始置信度分数
  • 确保rec_texts和rec_scores始终保持相同长度

修复文件:

  • paddlex/inference/pipelines/table_recognition/pipeline_v2.py

Fixes: PaddlePaddle/PaddleOCR#17051

问题描述:
当OCR文本框跨越多个表格单元格需要拆分时,split_ocr_bboxes_by_table_cells方法
只更新了rec_texts列表,但没有同步更新rec_scores列表,导致两者长度不一致。

修复内容:
- 在split_ocr_bboxes_by_table_cells方法中添加对rec_scores的处理
- 拆分OCR框时,为每个拆分后的框提取并保存对应的置信度分数
- 未拆分时,保留原始置信度分数
- 确保rec_texts和rec_scores始终保持相同长度

修复文件:
- paddlex/inference/pipelines/table_recognition/pipeline_v2.py

Fixes: OCR#17051
@paddle-bot
Copy link

paddle-bot bot commented Nov 12, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant