Skip to content

Commit

Permalink
Merge pull request #71 from husejinbg/main
Browse files Browse the repository at this point in the history
replaced deprecated BoxAnnotator with BoundingBoxAnnotator and LabelA…
  • Loading branch information
hkchengrex authored Mar 19, 2024
2 parents 04a7eff + 4b35c7a commit 58cff8c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions deva/inference/result_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,13 @@ def save_result(queue: Queue):
detections = sv.Detections(xyxy,
confidence=np.array(all_scores),
class_id=np.array(all_cat_ids))
annotator = sv.BoxAnnotator()
blend = annotator.annotate(scene=blend,
detections=detections,
labels=labels)
box_annotator = sv.BoundingBoxAnnotator()
label_annotator = sv.LabelAnnotator()
blend = box_annotator.annotate(scene=blend,
detections=detections)
blend = label_annotator.annotate(scene=blend,
detections=detections,
labels=labels)

if saver.dataset != 'gradio':
# find a place to save the visualization
Expand Down

0 comments on commit 58cff8c

Please sign in to comment.