Colorize
alexbeals.com
alexbeals.com
[1] https://en.wikipedia.org/wiki/Mean_shift [2] https://programmingdesignsystems.com/color/perceptually-unif...
Estimating Color-Concept Associations from Image Statistics. Ragini Rathore et al., IEEE VIS InfoVis 2019. https://arxiv.org/pdf/1908.00220.pdf
It compares k-means, median-cut, and simple RGB space quantization.
mean-shift is great, but it is unbelievably slow (n^2)
See: https://home.cscamm.umd.edu/programs/fam04/fgt_duraiswami_fa... (PDF file)
https://alexbeals.com/projects/colorize/search.php?q=coral
https://alexbeals.com/projects/colorize/search.php?q=goldenr...
https://alexbeals.com/projects/colorize/search.php?q=eggplan...
I don't believe just switching from average to dominant color will actually fix this.
(Edit: s/more often wrong than not/<diplomatic verbiage>/)
I would contend that if the suggest color is more than X away from the traditionally named color (as defined in rgb.txt), then it needs to be reconsidered to see if its "right" or not.
This site is an image search query tool, not a CSS color reference. We knew that before querying. It would be reasonable, and a great idea even, to return multiple results, and include the CSS color if the query matches that name. But maybe I really do want to query for pictures of coral and not the CSS color names. The CSS “coral” was someone’s arbitrary choice, and not the only right answer. Don’t make the mistake of assuming that CSS color names should be considered the authority on color names- to the exclusion of any other use of the word - outside of HTML or X11 contexts, or even within those contexts.
https://www.futurity.org/coral-hiv-aids-1307772-2/
https://www.forbes.com/sites/linhanhcat/2019/11/27/corals-en...
Part of the challenge is that saying "coral" is like saying "rainbow" in that app... which also gives you a brown color.
There are coral colored corals, there are green, blue... but its more in the pinks and reds than other colors.
https://www.ba-bamail.com/content.aspx?emailid=7375
The color https://alexbeals.com/projects/colorize/search.php?q=coral is most likely the color of the environment that the coral is in rather than the color of the coral itself.
Unless its based on https://www.pnas.org/content/117/5/2232 and similar images... in which case, that's rather depressing.
By the website's definition, which is right on the main page, it is not wrong. The website uses the "average color across the approximately 25 image results".
And for that purpose this site works fantastically, and I would say it's a pretty hilarious idea.
For example searching for Dolphin doesn't return grey but instead a shade of blue, because most dolphin pictures are dolphins in water.
I think the website takes our expectations and instead shows us the reality. And I think it does a fantastic job.
What I would like to see is an option to maybe increase the number of images to average from, maybe to 50, 100, etc. I would also love to see the source released so I can this instance locally.
https://alexbeals.com/projects/colorize/search.php?q=ketchup https://alexbeals.com/projects/colorize/search.php?q=solo+cu...
The results would definitely be closer to human expectations if run through something like https://www.remove.bg/ first.
1. classify the image
2. use word-net to figure out what "container" word is most closely associated with the image's classification
3. search the container word, and pull out its dominant colors
4. return the colors that are in the image but not in its classificatory container. Unless that set is empty (e.g. a polar bear in snow), in which case return the colors you'd have given without all these extra steps ;)
that is one possible reason, but it's a guess.
it could also be that it's weighted by the extremely high incidence of the miami dolphin team colors.
https://gist.github.com/riebschlager/2f1a3c0391bc42c9ec9bdc6...
A popular crowd-sourced dataset for this is [1] which contains average color association for 14,000 words. There is a demo available at [2].
There's also a recent work[3] trying to estimate such association using image data from Google, similar to the OP project, but a bit more sophisticated than just taking an average.
1: Colourful Language: Measuring Word-Colour Associations, Saif Mohammad, ACL 2011 Workshop on Cognitive Modeling and Computational Linguistics (CMCL). https://www.aclweb.org/anthology/W11-0611/
3: Estimating Color-Concept Associations from Image Statistics. Ragini Rathore et al., IEEE VIS InfoVis 2019. https://arxiv.org/pdf/1908.00220.pdf
https://alexbeals.com/projects/colorize/search.php?q=human https://alexbeals.com/projects/colorize/search.php?q=skin
this is crayola-gate all over....
"Average color" is not really what I want.
The most naive of interpretations (e.g. averaging each of the R/G/B values) is generally not what we want.
Would be super cool to add some different averaging schemes to this.
Polyphora mentioned CIELAB as just one example, and it's a good example. I believe state of the art these days is Oklab[2], talked about here[3]. I'd like to pull out a comment from 'jiggawatts in that discussion:
> This is a tour de force of colour theory, and should be mandatory reading for anyone serious about computer colour!
I completely agree.
With regards to 'p1necone's suggestion, k-nearest neighbors is one simple and relatively easy way to separate the colors into bins. I've only done this on a single image, but with multiple images maybe you could also k-nn bin the resulting colors from each image and only return bins which have multiple members.
0: https://news.ycombinator.com/item?id=25828733
1: https://news.ycombinator.com/item?id=25828773
Separating the subject from the background would also be useful - as simple as weighting the center of the image more than the edges?
proc color_name_to_hex {name} {
set hex "#"
foreach color [winfo rgb . "$name"] {
append hex [string range [format %02x $color] 0 1]
}
return $hex
}[1] https://alexbeals.com/projects/colorize/search.php?q=piss
Searching for Animals seems to be hit or miss too - e.g. I would expect 'Dolphin' or 'Shark' to return grey but of course all the images of them have blue ocean too and so you get a shade of blue instead.
Piss, unlike dolphin (for reasons you note), I would expect to return pretty close to the correct color, but I didn't go check the google results.
Is a bit better
Given a list of arbitrary strings, generate a consistent mapping from that list to a color palette of distinguishable colors.
This is distinct from deterministically mapping a single string to a single color (easy) because the intention is to provide a reasonably distinct set of colors, which I think can't be guaranteed when looking at single values.
Bonus: if [str1, str2, str3] -> [rgb1, rgb2, rgb3], have the map update incrementally, so that [str1, str2, str3, str4] -> [rgb1, rgb2, rgb3, rgb4].
I assume I'm restating a version of some existing algorithm, but I don't know what.
https://alexbeals.com/projects/colorize/search.php?q=Hacker+...
Not bad!
I coded this basic python script to show colors in terminal;
Fire is also not what I expected :)
'Colourize'.
In British English: Colourise. American: Colorize.
And we're very upset that spell checkers make us choose between only American and British options.
OED says that -ize is equally "correct" to -ise. Australian spelling guidance has dropped the U in "color", "honor" etc.
I keep the "e" in axe, I spell metric measures (and centre and theatre) with "-re"
I still differentiate between advise and advice, practise and practice, defense and defence.
And I'd spell "check" as "cheque" except no-one outside the US still uses those. /s
https://alexbeals.com/projects/colorize/search.php?q=Trump (#4F4252) https://alexbeals.com/projects/colorize/search.php?q=Biden (#433A4A)
Colors looks very similar O_o Could this be a sign?
Socialist: pinkish Communist: bright red Capitalist: light brown Fascist: dark brown
It would be a nicer experience if search bar would autofocus.