ydshieh
commited on
Commit
·
3eaff3e
1
Parent(s):
cd04261
Update
Browse files
app.py
CHANGED
@@ -159,7 +159,7 @@ def draw_entity_boxes_on_image(image, entities, show=False, save_path=None):
|
|
159 |
|
160 |
# draw bbox
|
161 |
# random color
|
162 |
-
color = used_colors[
|
163 |
new_image = cv2.rectangle(new_image, (orig_x1, orig_y1), (orig_x2, orig_y2), color, box_line)
|
164 |
|
165 |
l_o, r_o = box_line // 2 + box_line % 2, box_line // 2 + box_line % 2 + 1
|
|
|
159 |
|
160 |
# draw bbox
|
161 |
# random color
|
162 |
+
color = used_colors[color_id] # tuple(np.random.randint(0, 255, size=3).tolist())
|
163 |
new_image = cv2.rectangle(new_image, (orig_x1, orig_y1), (orig_x2, orig_y2), color, box_line)
|
164 |
|
165 |
l_o, r_o = box_line // 2 + box_line % 2, box_line // 2 + box_line % 2 + 1
|