Skip to content

Commit

Permalink
fix color issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Apr 18, 2024
1 parent d1d3268 commit 81f3cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vision_agent/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def overlay_bboxes(
elif isinstance(image, np.ndarray):
image = Image.fromarray(image)

color = {label: COLORS[i % len(COLORS)] for i, label in enumerate(bboxes["labels"])}
color = {label: COLORS[i % len(COLORS)] for i, label in enumerate(set(bboxes["labels"]))}

width, height = image.size
fontsize = max(12, int(min(width, height) / 40))
Expand Down

0 comments on commit 81f3cf3

Please sign in to comment.