Pages Menu
TwitterRssFacebook
Categories Menu

Posted by on Aug 5, 2016 in Uncategorized | 0 comments

Poetry Painter, Jean-Luc Beaubien

Poetry Painter, Jean-Luc Beaubien

Jean-Luc Beaubien

Poetry Painter:

 

A creative AI is the holy grail of computer science. Were a computer able to read poetry and paint a picture of what it read, it would be a miraculous achievement. Inspired by my love of art and poetry, I decided to tackle the challenge head on.

I outlined my program into a two step process:

  1. Read the poem or text file and analyze the colors associated with each word and create a color palette.
  2. Paint a canvas based on the information gathered from the poem.

 

To create the color palette, the program reads over every word in the text file and tries to find a color association. In order to do this, I make use of a document created by Computational Linguist Saif Mohammad, a specialist in word associations, who crowd sourced the associations people make with most words in the English lexicon. Using the information gathered here, the program tallies the number of appearances of each color and at the end creates a color palette of normalized probability distributions.

 

Using this color palette and the probabilities associated with each color, the program attempts to create a painting. At this point I decided a good approximation of creativity might be some random probability mixed in with a little logic. The program starts by painting a pixel and then moving on to paint all the neighboring pixels. It does this by adding them to a queue of pixels to paint, and based on some random chance, it will decide whether to add them to the front or the back of this queue, thus allowing for contiguous drawing versus not. This in a sense just a visualization of a basic pathfinding algorithm, and the program is deciding whether to continue on this new path or backtrack to where it has already been. Either way, it is guaranteed to visit every pixel. Pixels mix colors with their neighbors, taking on an average value of nearby colors, giving it a paint like feel. At any random point, the program might decide to start a new path of paint at a random location with a random color. Based on the variable sensitivity settings given to the program, paintings can be made with higher or lower dispersion (lots of colors vs few), and varied vs ordered shapes.

Overall, I very much enjoyed working on this project. I wish I had more time to keep adding more, as there is always more to be done.  

Without further ado, here are some paintings created by the program, using famous works as inputs:

 

The Raven:

Screen Shot 2016-08-05 at 3.30.58 PM

Road Less Traveled:

Screen Shot 2016-08-05 at 3.37.06 PM

War and Peace (complete text):

Screen Shot 2016-08-05 at 3.34.38 PM

Harry Potter, Book One (complete text):

Screen Shot 2016-08-05 at 3.39.34 PM

 

The path finding algorithm and painting can be seen here in this slowed down video:

Post a Reply

Your email address will not be published. Required fields are marked *