Skip to content
/ GARI Public
forked from ahmedfgad/GARI

This work introduces a simple project called GARI (Genetic Algorithm for Reproducing Images). GARI reproduces a single image using Genetic Algorithm (GA) by evolving pixel values.

Notifications You must be signed in to change notification settings

i-safari/GARI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GARI

This work introduces a simple project called GARI (Genetic Algorithm for Reproducing Images). GARI reproduces a single image using Genetic Algorithm (GA) by evolving pixel values.

This project works with both color and gray images without any modifications. Just give the image path. Using three parameters, we can customize it to statisfy our need. The parameters are: 1) Population size. I.e. number of individuals pepr population. 2) Mating pool size. I.e. Number of selected parents in the mating pool. 3) Mutation percentage. I.e. number of genes to change their values.

Value encoding used for representing the input. Crossover is applied by exchanging half of genes from two parents. Mutation is applied by randomly changing the values of randomly selected predefined percent of genes from the parents chromosome.

This project is implemented using Python 3.5 by Ahmed F. Gad. Contact info: [email protected] https://www.linkedin.com/in/ahmedfgad/

Here is an example of input image and how it is evolved after some iterations.

Original Image

fruit

Generation 0

solution_0

Generation 1,000

solution_1000

Generation 2,500

solution_2500

Generation 4,500

solution_4500

Generation 7,000

solution_7000

Generation 8,500

solution_8500

Generation 15,000

solution_15000

About

This work introduces a simple project called GARI (Genetic Algorithm for Reproducing Images). GARI reproduces a single image using Genetic Algorithm (GA) by evolving pixel values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%