Adapting label mapping for updated layout model

Signed-off-by: Maxim Lysak <mly@zurich.ibm.com>
This commit is contained in:
Maxim Lysak 2024-10-03 16:04:40 +02:00
parent 9b72a61914
commit aba833ab56

View File

@ -33,6 +33,7 @@ class LayoutModel:
"Page-footer",
"Code",
"List-item",
# "Title"
# "Formula",
]
PAGE_HEADER_LABELS = ["Page-header", "Page-footer"]
@ -71,6 +72,7 @@ class LayoutModel:
CLASS_REMAPPINGS = {
"Document Index": "Table",
"Title": "Section-header"
}
_log.debug("================= Start postprocess function ====================")
@ -277,6 +279,7 @@ class LayoutModel:
bbox=BoundingBox.model_validate(pred_item),
cells=[],
)
clusters.append(cluster)
# Map cells to clusters