Skip to content
Image generation via genetic algorithm.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
src
.gitignore
README.md
requirements.txt

README.md

evolisa

This is an attempt at generating an output image from a source picture by mutating a group of semi-transparent polygons.

I wanted to do something similar to this: http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/

animated gif of generated image generated image

The code is still very thrown together but it produces some acceptable results. Generating the image above took a couple of hours though so there's room for improvements.

I'd be happy to hear about ideas on how to improve the algorithm/code.

Install requirements

  • Create virtualenv

    virtualenv .
  • Install requirements

    bin/pip install -r requirements
  • (optional) PIL might have to be installed like this

    bin/pip install PIL --allow-external PIL --allow-unverified PIL --upgrade

Usage

  • Running the script

    bin/python src/generate.py <path_to_img>

Use a small source image (e.g. with a maximum size of 512x512 pixels). The generated image files will be created in your system's temp directory.

Notes

You can’t perform that action at this time.