Skip to content

Commit

Permalink
increase count threshold and size
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Oct 11, 2024
1 parent 4e3cfaa commit c454756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ def overlay_bounding_boxes(
bboxes = bbox_int[i]
bboxes = sorted(bboxes, key=lambda x: x["label"], reverse=True)

if len(bboxes) > 20:
if len(bboxes) > 40:
pil_image = _plot_counting(pil_image, bboxes, color)
else:
width, height = pil_image.size
Expand Down Expand Up @@ -2117,7 +2117,7 @@ def _plot_counting(
colors: Dict[str, Tuple[int, int, int]],
) -> Image.Image:
width, height = image.size
fontsize = max(10, int(min(width, height) / 80))
fontsize = max(12, int(min(width, height) / 40))
draw = ImageDraw.Draw(image)
font = ImageFont.truetype(
str(resources.files("vision_agent.fonts").joinpath("default_font_ch_en.ttf")),
Expand Down

0 comments on commit c454756

Please sign in to comment.