Compare commits

...

2 Commits

Author SHA1 Message Date
许瑞
efed5faa53 feat: modify foot note bbox tmp 2024-03-23 14:34:25 +08:00
xu rui
05161c6e62 feat: backup footnote_bbox_tmp 2024-03-23 14:11:50 +08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -531,6 +531,7 @@ def parse_pdf_for_train(
page_info["bak_page_no_bboxes"] = page_no_bboxs
page_info["bak_header_bboxes"] = header_bboxs
page_info["bak_footer_bboxes"] = footer_bboxs
page_info["bak_footer_note_bboxes"] = footnote_bboxes_tmp
pdf_info_dict[f"page_{page_id}"] = page_info

View File

@@ -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['footnote_bboxes_tmp']:
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