mirror of
https://github.com/IDEA-Research/GroundingDINO.git
synced 2025-06-03 14:50:05 +08:00
replaced BoundingBoxAnnotator with BoxAnnotator, updated Supervision version
This commit is contained in:
parent
d75c95daf6
commit
8b6a55f612
@ -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)
|
||||
|
@ -6,5 +6,5 @@ yapf
|
||||
timm
|
||||
numpy
|
||||
opencv-python
|
||||
supervision>=0.15.0
|
||||
supervision>=0.22.0
|
||||
pycocotools
|
||||
|
Loading…
x
Reference in New Issue
Block a user