From d8d732cd7ad07fd8390ea92c944b4f60864d1789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Wed, 31 May 2023 12:16:22 +0200 Subject: [PATCH] fix: rename compute_intersection_bounding_box function --- robotoff/prediction/ocr/dataclass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/robotoff/prediction/ocr/dataclass.py b/robotoff/prediction/ocr/dataclass.py index 4d46826ab3..e14fe30102 100644 --- a/robotoff/prediction/ocr/dataclass.py +++ b/robotoff/prediction/ocr/dataclass.py @@ -227,7 +227,7 @@ def get_match_bounding_box( if words is not None: if words: - return compute_intersection_bounding_box(words) + return compute_words_union_bounding_box(words) else: logger.warning( "no words found in %s, (start: %d, end: %d)", @@ -919,7 +919,7 @@ def detect_orientation(self) -> ImageOrientation: return ImageOrientation.unknown -def compute_intersection_bounding_box(words: list[Word]) -> tuple[int, int, int, int]: +def compute_words_union_bounding_box(words: list[Word]) -> tuple[int, int, int, int]: """Generate a bounding box that include all words. :param words: a list of words