Skip to content

Commit

Permalink
fix: rename compute_intersection_bounding_box function
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Jun 1, 2023
1 parent 74e346c commit d8d732c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robotoff/prediction/ocr/dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d8d732c

Please sign in to comment.