-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
New Ultralytics Colors() Palette #3046
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/rebase |
@SergioSanchezMontesUAM @kalenmike @SkalskiP we have our new official Ultralytics Color Palette by Alex now β!! You can start implementing this palette in our website and app. There are 20 colors (for classes 0-19) which are restarted once they are cycled through, i.e. classes 0, 20, 40 use the same color, as do classes 5, 65, 305, etc. class Colors:
# Ultralytics color palette https://ultralytics.com/
def __init__(self):
self.palette = [self.hex2rgb(c) for c in matplotlib.colors.TABLEAU_COLORS.values()]
# hex = matplotlib.colors.TABLEAU_COLORS.values()
hex = ('FF3838', 'FF9D97', 'FF701F', 'FFB21D', 'CFD231', '48F90A', '92CC17', '3DDB86', '1A9334', '00D4BB',
'2C99A8', '00C2FF', '344593', '6473FF', '0018EC', '8438FF', '520085', 'CB38FF', 'FF95C8', 'FF37C7')
self.palette = [self.hex2rgb('#' + c) for c in hex]
self.n = len(self.palette)
def __call__(self, i, bgr=False): The full list in RGB is here: colors.palette
Out[2]:
[(255, 56, 56),
(255, 157, 151),
(255, 112, 31),
(255, 178, 29),
(207, 210, 49),
(72, 249, 10),
(146, 204, 23),
(61, 219, 134),
(26, 147, 52),
(0, 212, 187),
(44, 153, 168),
(0, 194, 255),
(52, 69, 147),
(100, 115, 255),
(0, 24, 236),
(132, 56, 255),
(82, 0, 133),
(203, 56, 255),
(255, 149, 200),
(255, 55, 199)] |
Lechtr
pushed a commit
to Lechtr/yolov5
that referenced
this pull request
Jul 20, 2021
* Update Colors() * update colors * update colors (cherry picked from commit 52c0570)
Merged
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
* Update Colors() * update colors * update colors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Optimization of the color palette used in YOLOv5 visualizations.
π Key Changes
TABLEAU_COLORS
to a custom Ultralytics color palette.Colors
class initialization.π― Purpose & Impact