-
Search before asking
QuestionI'm using supervision for a project (currently I'm using supervision version 0.19) I use the annotate() function of sv.BoundingBoxAnnotator() for example When I use it with only the required parameters, it works correctly. My goal is to customize the colors of the bboxes. Let's imagine, I have 2 classes and I want to put these 2 custom colors: How should I transform this variable in order to pass it without error into the optional custom_color_lookup variable of the annotate() function? Thanks for your help AdditionalNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, let me convert this issue into a discussion and move it to the Q&A section. |
Beta Was this translation helpful? Give feedback.
-
Hi @Youho99 👋🏻, import supervision as sv
color = sv.ColorPalette.from_hex(['#3ab63f', '#459af5'])
annotator = sv.BoundingBoxAnnotator(color=color) |
Beta Was this translation helpful? Give feedback.
Hi @Youho99 👋🏻,
custom_color_lookup
is not the feature you are looking for. You should usesv.ColorPalette
. Now you will be able to plug it into any Supervision annotator.