Skip to content
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

Colorizing Moby-Dick #34

Open
altsoph opened this issue Nov 20, 2022 · 8 comments
Open

Colorizing Moby-Dick #34

altsoph opened this issue Nov 20, 2022 · 8 comments

Comments

@altsoph
Copy link

altsoph commented Nov 20, 2022

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

@altsoph
Copy link
Author

altsoph commented Nov 20, 2022

Gonna post details tomorrow

@altsoph
Copy link
Author

altsoph commented Nov 20, 2022

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
Copy link
Author

altsoph commented Nov 20, 2022

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:

  • words like ocean, sky, pool, sea, water tend to have blue or cyan color;
  • night, dark, sleep are dark gray or dark blue;
  • burnt, wine, flame, fire are red.

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

@altsoph
Copy link
Author

altsoph commented Nov 20, 2022

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

@altsoph
Copy link
Author

altsoph commented Nov 20, 2022

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

@altsoph
Copy link
Author

altsoph commented Nov 20, 2022

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

@altsoph
Copy link
Author

altsoph commented Nov 20, 2022

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
Copy link

Such an original idea, I love it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants