qubvel-hf HF staff commited on
Commit
6818d6c
·
verified ·
1 Parent(s): 944b712

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -51,7 +51,7 @@ def process_image(image: PIL.Image.Image) -> tuple[PIL.Image.Image, list[dict]]:
51
  label_annotator = sv.LabelAnnotator()
52
 
53
  # annotate bounding boxes
54
- annotated_frame = bounding_box_annotator.annotate(scene=image.copy(), detections=detections)
55
  annotated_frame = label_annotator.annotate(scene=annotated_frame, detections=detections, labels=text_labels)
56
 
57
  return annotated_frame
 
51
  label_annotator = sv.LabelAnnotator()
52
 
53
  # annotate bounding boxes
54
+ annotated_frame = bounding_box_annotator.annotate(scene=image.copy(), detections=detections, class_id=indexes, confidence=scores)
55
  annotated_frame = label_annotator.annotate(scene=annotated_frame, detections=detections, labels=text_labels)
56
 
57
  return annotated_frame