NaNoGenMo / 2022

National Novel Generation Month, 2022 edition.
51 stars 0 forks source link

Colorizing Moby-Dick #34

Open altsoph opened 2 years ago

altsoph commented 2 years ago

This is an old idea of mine, I wanted to try it for several years, maybe this time I'll do it

altsoph commented 2 years ago

Gonna post details tomorrow

altsoph commented 2 years ago

5 years ago, I made an pet-project for a color2color_name generation.

As a side artifact I had a 10K+ colors with names dataset, so I used it for a reversed task -- taken a fasttext vector for the word as an input, predict the RGB (or HSL, to be precise) components of it's color.

altsoph commented 2 years ago

Suddenly, it worked pretty well, so the majority of the color-words were colored right.

Also, I've tried to train another classifier head to predict, if the word have a color information at all. But still it thinks some non-color words have some significant colorization, for example:

It colors the random words in some strange ways as well :) For example, frost and frozen have red bias somewhy.

altsoph commented 2 years ago

So now I want to use this classifier to colorize each possible word in Moby-Dick.

altsoph commented 2 years ago

Here is an example snippet of text: example snippet of text

altsoph commented 2 years ago

It is also possible to calculate the flow of intensity of different colors through the chapters. flow

altsoph commented 2 years ago

I used the python-notebook to create the colorized html, then the wkhtmltopdf tool to convert it to PDF. The full result is here.

The repo: https://github.com/altsoph/MDC_nanogenmo2022

lizadaly commented 2 years ago

Such an original idea, I love it!