Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug when layout_predictor is None #13279

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

GreatV
Copy link
Collaborator

@GreatV GreatV commented Jul 6, 2024

from paddleocr import PPStructure

table_ocr = PPStructure(
    use_pdserving=False, use_gpu=False, lang="en", layout=False, show_log=False
)

result = table_ocr(
    "./data/paddle.png", return_ocr_result_in_table=True
)
  File "/Users/wangxin/repos/PaddleOCR/paddleocr.py", line 855, in __call__
    res, _ = super().__call__(img, return_ocr_result_in_table, img_idx=img_idx)
  File "/Users/wangxin/repos/PaddleOCR/ppstructure/predict_system.py", line 172, in __call__
    "score": region["score"],
KeyError: 'score'

Copy link
Collaborator

@UserWangZz UserWangZz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GreatV GreatV merged commit 446f1cf into PaddlePaddle:main Jul 6, 2024
3 checks passed
@GreatV GreatV deleted the fix_bug_layout_score branch July 6, 2024 11:14
GreatV added a commit to GreatV/PaddleOCR that referenced this pull request Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants