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

sort formulas and text in a line && bug fix #3568

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

changdazhou
Copy link
Collaborator

No description provided.

Copy link

paddle-bot bot commented Mar 10, 2025

Thanks for your contribution!

@changdazhou changdazhou force-pushed the new_pipe branch 2 times, most recently from 6102417 to b499eff Compare March 12, 2025 03:36
@changdazhou changdazhou changed the title sort formulas and text in a line sort formulas and text in a line && bug fix Mar 12, 2025
@@ -310,14 +310,18 @@ def get_layout_parsing_res(
del overall_ocr_res["rec_polys"][matched_idx]
del overall_ocr_res["rec_scores"][matched_idx]

if sub_ocr_res["rec_boxes"] is not []:
if sub_ocr_res["rec_boxes"].size > 0:
sub_ocr_res["rec_labels"] = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

sub_ocr_res["rec_labels"] = ["text"] * len(sub_ocr_res["rec_texts"])

@@ -474,6 +480,7 @@ def predict(
yield {"error": "the input params for model settings are invalid!"}

for img_id, batch_data in enumerate(self.batch_sampler(input)):
print(batch_data.input_paths[0])
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个应该删掉吧

@@ -536,6 +543,10 @@ def predict(
else:
overall_ocr_res = {}

overall_ocr_res["rec_labels"] = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

overall_ocr_res["rec_labels"] = ["text"] * len(overall_ocr_res["rec_texts"])

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.

2 participants