dwb2023 commited on
Commit
7596685
1 Parent(s): 56bb16d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,13 +30,13 @@ def draw_annotations(index):
30
  # Draw bounding box with color based on category
31
  bbox = record["bbox"]
32
  category_id = record["category_id"]
33
- box_color = CATEGORY_COLORS.get(category_id, "yellow") # Default to blue if category not in mapping
34
  draw.rectangle([bbox[0], bbox[1], bbox[0] + bbox[2], bbox[1] + bbox[3]], outline=box_color, width=2)
35
 
36
  # Draw segmentation mask
37
  segmentation = record["segmentation"]
38
  for seg in segmentation:
39
- draw.polygon(seg, outline="orange", width=2)
40
 
41
  # Prepare additional information
42
  area = record["area"]
 
30
  # Draw bounding box with color based on category
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=2)
35
 
36
  # Draw segmentation mask
37
  segmentation = record["segmentation"]
38
  for seg in segmentation:
39
+ draw.polygon(seg, outline="red", width=2)
40
 
41
  # Prepare additional information
42
  area = record["area"]