Update app.py
Browse files
app.py
CHANGED
@@ -31,12 +31,12 @@ def draw_annotations(index):
|
|
31 |
bbox = record["bbox"]
|
32 |
category_id = record["category_id"]
|
33 |
box_color = CATEGORY_COLORS.get(category_id, "yellow") # Default to yellow if category not in mapping
|
34 |
-
draw.rectangle([bbox[0], bbox[1], bbox[0] + bbox[2], bbox[1] + bbox[3]], outline=box_color, width=
|
35 |
|
36 |
# Draw segmentation mask
|
37 |
segmentation = record["segmentation"]
|
38 |
for seg in segmentation:
|
39 |
-
draw.polygon(seg, outline="red", width=
|
40 |
|
41 |
# Prepare additional information
|
42 |
area = record["area"]
|
|
|
31 |
bbox = record["bbox"]
|
32 |
category_id = record["category_id"]
|
33 |
box_color = CATEGORY_COLORS.get(category_id, "yellow") # Default to yellow if category not in mapping
|
34 |
+
draw.rectangle([bbox[0], bbox[1], bbox[0] + bbox[2], bbox[1] + bbox[3]], outline=box_color, width=3)
|
35 |
|
36 |
# Draw segmentation mask
|
37 |
segmentation = record["segmentation"]
|
38 |
for seg in segmentation:
|
39 |
+
draw.polygon(seg, outline="red", width=1)
|
40 |
|
41 |
# Prepare additional information
|
42 |
area = record["area"]
|