But why?
- It's a simple project of mine that was elaborated in about a day (but I will continue it cause it's really fun). These already exist, and there are tons on the internet that you can check out that are probably better than mine.
- Yea it's fun.
Since there are a few parameters that can be tweaked on, results may differ, and the bigger your population size and number of epochs, the longer it will take to generate the output image.
You can experiment it yourself by changing the parameters and using your own images.
- You can clone this repository by doing:
https://github.com/thiagop-usp/Genetic-Imaging.git
- After that, you will need some python3 libraries, so you can run:
pip3 install -r requirements.txt
- Then make sure you're running it with Python 3.7 (f-strings are the best):
python3 genetic.py
- Code is kind bad. It can be much better modularized.
- It's quite slow, some things can be changed when calculating the fitness.
- There are much better ways to reproduce the individuals (and some better ways to maintain good ones
- The idea of mutation is very important here, but I didn't use it.
- Make the progress and estimated time better to understand haha.
- Make it work to grayscale and RGB as well. As of right now it's only black and white, and if you tweak the code around it won't work.
- Video mode: it will create a timelapse.
- Works with greyscale now. RGB still in progress.
- RGB and Rectangles are giving me lots of bugs, not working well yet =(.