Create a unified ColorPalette Generator
0ssamaak0 opened this issue · 4 comments
The following implementation of coloring the masks and the bboxes is very bad, it's based on a hardcoded color palette copied and pasted across many files such as intelligence.py
, mathOps.py
, visualizations,py
etc
The current color palette is
color_palette = [(75, 25, 230),
(75, 180, 60),
(25, 225, 255),
(200, 130, 0),
(49, 130, 245),
(180, 30, 145),
(240, 240, 70),
(230, 50, 240),
(60, 245, 210),
(190, 190, 250),
(128, 128, 0),
(255, 190, 230),
(40, 110, 170),
(200, 250, 255),
(0, 0, 128),
(195, 255, 170)]
They were implemented like this to be diverse and cover wide range of colors, because just choosing random RGB values may lead to some similiarty between colors of diff classes (e.g., both are similar shades of blue)
The main goal is to create a color generator class that generates colors that are not limited (here we have 12 colors) and sample them for a distribution keeps them dfferent from each other, after making this generator it must replaces all the occurenecs of this hard coded code
Hello @0ssamaak0 ,
I would like to work on this issue, can you assign it to me?
it's already assigned, plesae check discord server
can we solve this by using random function to generate random colours eg generate values between 0-255
can we solve this by using random function to generate random colours eg generate values between 0-255
no, it may result in very similar colors, check the issue description.
anyway someone has worked on it and made a pull request