Charles Kabui
commited on
Commit
·
9faad30
1
Parent(s):
e18f153
unzip
Browse files- utils/unzip.py +2 -0
- utils/visualize_bboxes_on_image.py +0 -1
utils/unzip.py
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
def unzip(items: list):
|
2 |
+
return list(zip(*items))
|
utils/visualize_bboxes_on_image.py
CHANGED
@@ -51,7 +51,6 @@ def visualize_bboxes_on_image(
|
|
51 |
x0, y0, x1, y1 = convert_to_x0y0x1y1(bbox) if convert_to_x0y0x1y1 is not None else bbox
|
52 |
draw.rectangle([x0, y0, x1, y1], outline=bbox_color, width=width)
|
53 |
if title is not None:
|
54 |
-
title = title + " " + str(bbox)
|
55 |
text_position = (x0 + label_rectangle_left_padding, y0 - label_rectangle_top_padding)
|
56 |
text_bbox_left, text_bbox_top, text_bbox_right, text_bbox_bottom = draw.textbbox(text_position, title, font=font)
|
57 |
draw.rectangle(
|
|
|
51 |
x0, y0, x1, y1 = convert_to_x0y0x1y1(bbox) if convert_to_x0y0x1y1 is not None else bbox
|
52 |
draw.rectangle([x0, y0, x1, y1], outline=bbox_color, width=width)
|
53 |
if title is not None:
|
|
|
54 |
text_position = (x0 + label_rectangle_left_padding, y0 - label_rectangle_top_padding)
|
55 |
text_bbox_left, text_bbox_top, text_bbox_right, text_bbox_bottom = draw.textbbox(text_position, title, font=font)
|
56 |
draw.rectangle(
|