fix: Incorrect scaling of TableModel bboxes when do_cell_matching is False (#1459)
fixing double scaling in case of do_cell_matching is False Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
parent
c67133dde4
commit
94d66a0765
@ -267,7 +267,7 @@ class TableStructureModel(BasePageModel):
|
|||||||
element["bbox"]["token"] = text_piece
|
element["bbox"]["token"] = text_piece
|
||||||
|
|
||||||
tc = TableCell.model_validate(element)
|
tc = TableCell.model_validate(element)
|
||||||
if self.do_cell_matching and tc.bbox is not None:
|
if tc.bbox is not None:
|
||||||
tc.bbox = tc.bbox.scaled(1 / self.scale)
|
tc.bbox = tc.bbox.scaled(1 / self.scale)
|
||||||
table_cells.append(tc)
|
table_cells.append(tc)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user