replaced BoundingBoxAnnotator with BoxAnnotator, updated Supervision version

pull/342/head
ethanlee928 2024-07-23 23:19:52 +08:00
parent d75c95daf6
commit 8b6a55f612
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ def annotate(image_source: np.ndarray, boxes: torch.Tensor, logits: torch.Tensor
in zip(phrases, logits)
]
bbox_annotator = sv.BoundingBoxAnnotator(color_lookup=sv.ColorLookup.INDEX)
bbox_annotator = sv.BoxAnnotator(color_lookup=sv.ColorLookup.INDEX)
label_annotator = sv.LabelAnnotator(color_lookup=sv.ColorLookup.INDEX)
annotated_frame = cv2.cvtColor(image_source, cv2.COLOR_RGB2BGR)
annotated_frame = bbox_annotator.annotate(scene=annotated_frame, detections=detections)

View File

@ -6,5 +6,5 @@ yapf
timm
numpy
opencv-python
supervision>=0.15.0
supervision>=0.22.0
pycocotools