Can My Computer Draw

Programming


An exploration of using machine learning to recreate hand drawn mandalas

This project started as an attempt to recreate a hand drawn world map with mandalas with the help of a computer.

Original Drawing

original hand drawn world map drawing

Final Result

final world map drawing generate using machine learning

In order to recreate this drawing, a machine learning algorithm was run against a set of mandala drawings that I created for this project.

Process Details

To facilitate the machine learning process, I created a tool that allowed me to quickly generate mandalas for training.

The tool mirrors the mouse movement on a circular axis. The movement of the mouse was recorded and used as the input language to the machine learning algorithm. This way, the machine learning language automatically captured the concept of circular symmetry. For instance, the letter 'a' was recorded if the mouse moved one pixel to the right and the letter 'd' was recorded if the mouse moved one pixel up.

example of movement recording a letter example of movement recording a letter

Finally, around 250 mandalas were drawn and each mandala's input was recorded as a paragraph. This came to a total of 0.2 million characters.

This data was fed to a training algorithm called char-rnn with ternsor flow with 3 layers. This is a machine learning algorithm commonly used to generate dynamic text using computer.

sample mandala output sample mandala output sample mandala output sample mandala output sample mandala output sample mandala output
← Back to Home