Genetic Algorithm on Image

I tried to apply genetic algorithm on image. The original photo is 300*450, which means if I want to generate the exact photo, I need to get 1 from 300*450*3*255 cases. That’s why I only took the red value and also made the image pixelated.

In order to have a better performance, I also changed the mutate function a little bit to avoid decreasing accuracy by only mutating the wrong genes.

Source code is available on Github

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s