Skip to content

Commit

Permalink
Update vis_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fsx950223 committed Jun 9, 2023
1 parent 0b9463f commit 4398750
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions efficientdet/visualize/vis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ def draw_bounding_box_on_image(image,
text_bottom = bottom + total_display_str_height
# Reverse list and print from bottom to top.
for display_str in display_str_list[::-1]:
left, top, right, bottom = font.getbbox(display_str)
text_width, text_height = (right - left, bottom - top)
x1, y1, x2, y2 = font.getbbox(display_str)
text_width, text_height = (x2 - x1, y2 - y1)
margin = np.ceil(0.05 * text_height)
draw.rectangle([(left, text_bottom - text_height - 2 * margin),
(left + text_width, text_bottom)],
Expand Down

0 comments on commit 4398750

Please sign in to comment.