We do have models that predict the basic color from its description, by basic color I mean red, blue, black etc. But I would like to develop a model that can spit out the RGB or HEX colors by a description of it, an example being, "yellow that is glossy and sorta dark" should give the respective value for the same. Another example would be, "Clear green plastic". This is relative to 3d modelling where I input this text and change the material of the object on the screen.
-
1$\begingroup$ Look at encoder-decoders more generally (not limited to NMT). $\endgroup$– clefJul 23, 2021 at 15:15
-
1$\begingroup$ xkcd.com/1492 $\endgroup$– user3067860Jul 23, 2021 at 19:01
-
$\begingroup$ @clef can you be a little specific? $\endgroup$– LoukikJul 23, 2021 at 19:47
-
$\begingroup$ @user3067860 whats that? $\endgroup$– LoukikJul 23, 2021 at 20:26
-
1$\begingroup$ @Loukik Encoders decoders are used in several applications, including (but not limited to) neural machine translation (NMT). For example, Seq2seq approaches are encoder-decoders applied to language (en.wikipedia.org/wiki/Seq2seq), autoencoders are applied to unsupervised learning of features (en.wikipedia.org/wiki/Autoencoder), etc. You might find things of interest in other approaches with the same enc-dec architecture principle. $\endgroup$– clefJul 26, 2021 at 7:39
1 Answer
In fact, you want to translate "yellow that is glossy and sorta dark" by (170,173,11).
A good way to solve this, is by using a neural machine translation model.
Therefore, you can use a encoder/decoder system like many translation models, but with 3 digits as output. To achieve this, you will want to have training data with plenty of text to color translation, but they don't need to be too exhaustive if you cover enough scenarios. The output sequence could be 3 digits 170 173 11. The neural machine translation should adapt itself to the different results automatically, and make good predictions because we have a similar sequence structure as any language.
You have plenty of neural machine translation code examples, here is one among others: https://machinelearningmastery.com/develop-neural-machine-translation-system-keras/
-
-
$\begingroup$ You're welcome. Be aware that the best output would be 3 integers digits, but it would require a specific decoder, i.e. some modifications of a language translation's decoder. It is due to the incremental nature of RGB digits: such a translation system should guess the increase or the decrease of R,G and B according to the color description (ex: "quite dark" means a decrease of each RGB values, or "very clear" means an important increase of each RGB values). This system would be better to translate shades than plain text as output. $\endgroup$ Jul 23, 2021 at 18:05
-
$\begingroup$ yeah I was thinking about the same, I will have to try different ways and firstly gather the training data, do let me know if you have any links or references that might help, thanks once again. $\endgroup$– LoukikJul 23, 2021 at 20:26