/SketchingAI

Sketching AI, based on a convolutional neural network and genetic algorithm

Primary LanguagePython

SketchingAI

Sketching AI, based on a convolutional neural network and genetic algorithm

Quick explanation: Drawings are generated and the neural network looks at them and chooses the ones that are most like the object it was asked for. The genetic algorithm takes care of combining the best ones and within a few generations (a couple hundreds), it produces (sometimes) recognizable sketches.

Not really intended for distribution yet, but it works if you install a few things (all free and working under Linux):

  1. Install Anaconda https://store.continuum.io/cshop/anaconda/
  2. Install Caffe http://caffe.berkeleyvision.org/
  3. Download the sketch dataset http://cybertron.cg.tu-berlin.de/eitz/projects/classifysketch/

Nothing is really optimized (either in speed or "accuracy") and the code is a bit of a mess for now, I just meant to put it out there while I work on other things.

An album of a few images produced by the AI are here: http://imgur.com/a/0ag4u You can guess what they are, read on to know the actual categories: brain, butterfly, alarm clock, hourglass, and trousers (the hourglass was a color experiment with real pictures, not the sketch database). Here's a video of the process in action, when asked for a snowman: http://gfycat.com/ComplexMelodicLacewing (200 generations)