Skip to content

Implementation of Genetic Algorithm used to repaint pictures

Notifications You must be signed in to change notification settings

PeterWaIIace/GeneticPainter

Repository files navigation

GeneticPainter

My take on genetic painters - algorithm painting reference image using genetic algorithms with crossover and mutations.

All results are achieved by pure crossover and mutation, no changes or masking to reference image are performed. Algorithm learns by comparing difference between generation and reference image. Results are speed up as details generation can take a while. Algorithm is armed with genomes removal mechanism, which removes bad genomes from possibility space.

With genomes removal:

With genomes removal in colour:

Without genomes removal:

How to use

python3 -m pip install -r requirements.txt
python3 painter.py Lena.png

Features

  • genomes removal - algorithms removes genomes from the pool of all possible combination if they do not produce any improvements, that way algorithm doesn't waste time for trying twice the same solution.

About

Implementation of Genetic Algorithm used to repaint pictures

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages