prithivMLmods commited on
Commit
3e7aee0
·
verified ·
1 Parent(s): 5baac10

update app

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -127,7 +127,7 @@ def annotate_image(image: Image.Image, result: dict):
127
 
128
  points_array = np.array(points_list).reshape(1, -1, 2)
129
  key_points = sv.KeyPoints(xy=points_array)
130
- vertex_annotator = sv.VertexAnnotator(radius=8, color=sv.Color.RED)
131
  return vertex_annotator.annotate(scene=image.copy(), key_points=key_points)
132
 
133
  if "objects" in result and result["objects"]:
@@ -147,7 +147,7 @@ def annotate_image(image: Image.Image, result: dict):
147
  if len(detections) == 0:
148
  return image
149
 
150
- box_annotator = sv.BoxAnnotator(color_lookup=sv.ColorLookup.INDEX, thickness=5)
151
  return box_annotator.annotate(scene=image.copy(), detections=detections)
152
 
153
  return image
 
127
 
128
  points_array = np.array(points_list).reshape(1, -1, 2)
129
  key_points = sv.KeyPoints(xy=points_array)
130
+ vertex_annotator = sv.VertexAnnotator(radius=4, color=sv.Color.RED)
131
  return vertex_annotator.annotate(scene=image.copy(), key_points=key_points)
132
 
133
  if "objects" in result and result["objects"]:
 
147
  if len(detections) == 0:
148
  return image
149
 
150
+ box_annotator = sv.BoxAnnotator(color_lookup=sv.ColorLookup.INDEX, thickness=2)
151
  return box_annotator.annotate(scene=image.copy(), detections=detections)
152
 
153
  return image