Repository navigation
Replies: 1 comment
|
Hi @SlawekTT — this is already possible: every annotator's palette = sv.ColorPalette.from_hex(["#808080", "#FF0000"]) # 0 = default, 1 = highlight
box_annotator = sv.BoxAnnotator(color=palette)
label_annotator = sv.LabelAnnotator(color=palette)
lookup = (detections.tracker_id == selected_id).astype(int)
frame = box_annotator.annotate(frame, detections, custom_color_lookup=lookup)
frame = label_annotator.annotate(frame, detections, custom_color_lookup=lookup)Closing as resolved — please reopen if something is still missing. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Could box_annotator have 'color' parameter - so as one could change dynamically change bbox color, eg. one color for all the bboxes except for the selected id, which would be highlighted with another color? The lack of this feature often makes the use of box_annotator and label_annotator obsolete
All reactions