Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
myhloli committed Mar 26, 2024
2 parents 6f80bea + cb1b02e commit 671ce1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion magic_pdf/pdf_parse_for_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def parse_pdf_for_train(
# 解析表格并对table_bboxes进行位置的微调,防止表格周围的文字被截断
table_bboxes = parse_tables(page_id, page, model_output_json)
table_bboxes = fix_tables(
page, table_bboxes, include_table_title=True, scan_line_num=2
page, table_bboxes, include_table_title=False, scan_line_num=2
) # 修正
table_bboxes = fix_table_text_block(
text_raw_blocks, table_bboxes
Expand Down
4 changes: 2 additions & 2 deletions magic_pdf/train_utils/convert_to_train_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def convert_to_train_format(jso: dict) -> []:
n_bbox = {"category_id": 10, "bbox": inter_equation["bbox"]}
bboxes.append(n_bbox)

for footnote in v['bak_footer_note_bboxes']:
n_bbox = {"category_id": 5, "bbox": footnote["bbox"]}
for footnote_bbox in v["bak_footer_note_bboxes"]:
n_bbox = {"category_id": 5, "bbox": list(footnote_bbox)}
bboxes.append(n_bbox)

info["bboxes"] = bboxes
Expand Down

0 comments on commit 671ce1d

Please sign in to comment.