Skip to content

Commit

Permalink
Merge pull request #146 from stellasphere/patch-2
Browse files Browse the repository at this point in the history
Update to support newer versions of Supervision
  • Loading branch information
capjamesg committed May 17, 2024
2 parents d73eb82 + 2c3b8ea commit bc82593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autodistill/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ def plot(image: np.ndarray, detections, classes: List[str], raw=False):
if detections.mask is not None:
annotator = sv.MaskAnnotator()
else:
annotator = sv.BoxAnnotator()
annotator = sv.BoundingBoxAnnotator()

label_annotator = sv.LabelAnnotator()

labels = [
f"{classes[class_id]} {confidence:0.2f}"
for _, _, confidence, class_id, _ in detections
for _, _, confidence, class_id, _, _ in detections
]

annotated_frame = annotator.annotate(scene=image.copy(), detections=detections)
Expand Down

0 comments on commit bc82593

Please sign in to comment.