Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LabelAnnotator, RichLabelAnnotator, VertexLabelAnnotator] - allow text_color to be Union[Color, ColorPalette] #1384

Closed
SkalskiP opened this issue Jul 19, 2024 · 5 comments
Assignees
Labels
api:annotator Annotators enhancement New feature or request help wanted Extra attention is needed

Comments

@SkalskiP
Copy link
Collaborator

SkalskiP commented Jul 19, 2024

Description

LabelAnnotator, RichLabelAnnotator, and VertexLabelAnnotator currently allow defining the background color as Union[Color, ColorPalette]. When the background color is a single Color, all boxes are drawn with the same color. If the background color is a ColorPalette, the detection index, class_id, or tracker_id is mapped to the corresponding color from the palette. Unfortunately, this functionality is not currently available for text_color.

Update LabelAnnotator, RichLabelAnnotator, and VertexLabelAnnotator to enable defining text_color as Union[Color, ColorPalette] and implement the same mechanism as for the background color.

Additional

  • Note: Please share a Google Colab with minimal code to test the new feature. We know it's additional work, but it will speed up the review process. The reviewer must test each change. Setting up a local environment to do this is time-consuming. Please ensure that Google Colab can be accessed without any issues (make it public). Thank you! 🙏🏻
@SkalskiP SkalskiP added enhancement New feature or request api:annotator Annotators labels Jul 19, 2024
@SkalskiP SkalskiP changed the title [LabelAnnotator, RichLabelAnnotator] - allow text_color to be Union[Color, ColorPalette] [LabelAnnotator, RichLabelAnnotator, VertexLabelAnnotator] - allow text_color to be Union[Color, ColorPalette] Jul 19, 2024
@SkalskiP SkalskiP added the help wanted Extra attention is needed label Jul 19, 2024
@Bhavay-2001
Copy link
Contributor

Hi @SkalskiP, you can assign this to me. I'll take a look over thr weekend.

@SkalskiP
Copy link
Collaborator Author

@Bhavay-2001 Done ✅

@SkalskiP
Copy link
Collaborator Author

The expected change was added to LabelAnnotator and RichLabelAnnotator via #1387. @Bhavay-2001 would you be interested in adding this change to VertexLabelAnnotator as well?

@Bhavay-2001
Copy link
Contributor

Sure

@SkalskiP
Copy link
Collaborator Author

@Bhavay-2001 thank you ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:annotator Annotators enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants