-
Notifications
You must be signed in to change notification settings - Fork 997
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
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
6102417
to
b499eff
Compare
@@ -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"] = [ |
There was a problem hiding this comment.
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]) |
There was a problem hiding this comment.
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"] = [ |
There was a problem hiding this comment.
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"])
No description provided.