This project generates butterflies using the recurrent neural network model Sketch-RNN, which has been ported to TensorFlow.js under the Magenta.js project. Magenta is an open source research project exploring the role of machine learning as a tool in creative processes.
See the sketching action HERE!
Sketch-RNN was taught to draw by training it on millions of doodles collected from the Quick, Draw! game. With over 100 different models to choose from, the butterfly object is just one possible choice. All those doodles contributing to that particular dataset can be found & viewed here.
Visualizing neural network generated drawings in the web browser has been made possible by using ml5js, which is a library built on top of TensorFlow.js with no other external dependencies.
Go ahead & try doodling other objects for yourself with SketchRNN's online demo.