|
The genetic algorithm is a way to create solutions to problems by mimicking the way that nature works. However, that doesn't mean it can't be fun! Pareidoloop is a program which uses a GA approach to create a face that satisfies a face recognition algorithm - and all using JavaScript.
The basic idea of the GA is simple enough. Start with a representation of a solution as a sequence of bits that can be combined in the same way as DNA, i.e. using exchange and mutation. Next set up a population of solutions and test them against the problem. Finally weed out the poor performers and allow the best of the rest to mix their genetic material to product the next generation of solutions.
If you go through enough generations the solutions should keep getting better as the population evolves towards a better fitness.

Image:Philip Mccarthy
This is the idea behind Pareidoloop. It uses a face detection program written in JavaScript. This is taken from Liu Liu's Core Computer Vision library which provides a range of image processing algorithms as well as face detection and is well worth knowing about.
Next code up a way to generate random polygons such that the representation can take part in the GA. This part of the program is based on an earlier experiment with trying to breed the Mona Lisa - see Roger Alsing’s Evolution of Mona Lisa.
All you have to do next is to run the GA and use the output of the face detection program as the measure of fitness of each individual in the population. Keep the generations turning over and eventually you will reach a reasonable arrangement of polygons which activates the face detection algorithm - i.e. it looks like a face.
Why Pareidoloop?
This is the term for the phenomenon of seeing things like faces in random textures. I'm not sure that this is quite Pareidoloop in that the input isn't random as it is being designed for the purpose.
Is there any purpose to this?
Unlikely, but it is a good demonstration of the GA in action and the images it creates are kind of spooky. There might be a call for artistic renderings of the eigenface of face detection, but mostly it's just fun.
Computer Model Explains High Blood Pressure 12/05/2013
If you are not a medic then presumably you, like me, thought that we knew most of the basics of what causes high blood pressure as we age. It turns out that we really didn't and now a new computer mod [ ... ]
|
May Computing MOOCs and Open Courses 30/04/2013
Free online courses provide a good way to extend your knowledge and skill set. Here's our regular round up of ones that are starting this month, plus a new addition to open courseware. We also have ne [ ... ]
| | More News |
|