orsher / ImageReconstruction

Using optimizations algorithms to reconstruct images from a set of basic shapes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image Reconstruction

Using optimization algorithms for reconstructing an image from a set of basic shapes.

Currently supported algorithms: Genetic Algorithm Currently supported shapes: Circle, Triangle

Tested on Ubuntu 18.10 & python 3.7.3

Usage

Create and use virtual env:

virtualenv -p `which python3` venv
source venv/bin/activate

Install dependencies:

pip install -r requirements.txt

test:

pytest

Install as package

pip install -U .

Run

reconstruct --help
reconstruct GeneticAlgo --help
reconstruct --image ./data/monaliza.jpg --shape Triangle GeneticAlgo --max-generations 10000 --number-of-shapes 50

Example output

alt text

About

Using optimizations algorithms to reconstruct images from a set of basic shapes


Languages

Language:Python 100.0%