Skip to content

Latest commit

 

History

History
45 lines (40 loc) · 1.55 KB

README.md

File metadata and controls

45 lines (40 loc) · 1.55 KB

Annabel

Approximate Nearest Neighbor Assisted Generative Collage

About

 _ __ __  _ |_  _  |
(_|| || |(_||_)(/_ |

annabel.py
Approximate Nearest Neighbor Assisted Generative Collage
Copyright (C) 2015 Thomas Valadez (@tvldz)
License: GPLv2

Requires
annoy: https://github.com/spotify/annoy
pillow: http://python-pillow.github.io/

annabel.py is a tool for creating generative collages using
approximate nearest neighbor search. Source images are cropped,
processed (as a feature vector of grayscale values) and indexed
into a flat file database using Spotify's annoy library. Source
images, metadata and search indexes are stored in the profiles/
folder. Collages are generated by querying the database of
source images with content from a new image. The algorithm
attempts to recreate the new image with images found in the
database.

Usage

usage: annabel.py [-h] {gather,create,list} ...

positional arguments:
  {gather,create,list}
    gather              create a "profile" of source images from which
                        collages may be created.
    create              create a new collage given an image and a profile.
    list                list the available profiles.

optional arguments:
  -h, --help            show this help message and exit

Example Output

An image of the moon created from cartoon stills

Marilyn Monroe created from images of the surface of the moon.