SkalskiP commited on
Commit
05403bd
·
verified ·
1 Parent(s): 472db26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -71,7 +71,7 @@ DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
71
  EFFICIENT_SAM_MODEL = load(device=DEVICE)
72
  YOLO_WORLD_MODEL = YOLOWorld(model_id="yolo_world/l")
73
 
74
- BOUNDING_BOX_ANNOTATOR = sv.BoundingBoxAnnotator()
75
  MASK_ANNOTATOR = sv.MaskAnnotator()
76
  LABEL_ANNOTATOR = sv.LabelAnnotator()
77
 
@@ -99,7 +99,7 @@ def annotate_image(
99
  zip(detections.class_id, detections.confidence)
100
  ]
101
  output_image = MASK_ANNOTATOR.annotate(input_image, detections)
102
- output_image = BOUNDING_BOX_ANNOTATOR.annotate(output_image, detections)
103
  output_image = LABEL_ANNOTATOR.annotate(output_image, detections, labels=labels)
104
  return output_image
105
 
 
71
  EFFICIENT_SAM_MODEL = load(device=DEVICE)
72
  YOLO_WORLD_MODEL = YOLOWorld(model_id="yolo_world/l")
73
 
74
+ BOX_ANNOTATOR = sv.BoxAnnotator()
75
  MASK_ANNOTATOR = sv.MaskAnnotator()
76
  LABEL_ANNOTATOR = sv.LabelAnnotator()
77
 
 
99
  zip(detections.class_id, detections.confidence)
100
  ]
101
  output_image = MASK_ANNOTATOR.annotate(input_image, detections)
102
+ output_image = BOX_ANNOTATOR.annotate(output_image, detections)
103
  output_image = LABEL_ANNOTATOR.annotate(output_image, detections, labels=labels)
104
  return output_image
105