mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
fix(TesserOcrModel): Fix cell coordinates
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
This commit is contained in:
parent
29e65e911b
commit
118afee1f3
@ -47,7 +47,6 @@ class TesserOcrModel(BaseOcrModel):
|
||||
def __del__(self):
|
||||
if self.reader is not None:
|
||||
# Finalize the tesseractAPI
|
||||
_log.debug("Finalize TesserOCR")
|
||||
self.reader.End()
|
||||
|
||||
def __call__(self, page_batch: Iterable[Page]) -> Iterable[Page]:
|
||||
@ -91,9 +90,8 @@ class TesserOcrModel(BaseOcrModel):
|
||||
text=text,
|
||||
confidence=confidence,
|
||||
bbox=BoundingBox.from_tuple(
|
||||
# l, b, r, t = coord[0], coord[1], coord[2], coord[3]
|
||||
coord=(left, bottom, right, top),
|
||||
origin=CoordOrigin.BOTTOMLEFT,
|
||||
coord=(left, top, right, bottom),
|
||||
origin=CoordOrigin.TOPLEFT,
|
||||
),
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user