/painter-ga

Painter genetic algorithm.

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

16bb 32bb 64bb 128bb 256bb 512bb 1024bb

16bb 32bb 64bb 128bb 256bb 512bb 1024bb

🎨 painter-ga

Python VS Code

Project Status version GitHub Issues Contributions welcome License

Painter genetic algorithm.

Getting Started

Prerequisites

  • Python 3.8.6+
  • Anaconda 4.9.2+ (optional)
  • Python modules from the requirements.txt

Usage

To run the genetic algorithm, use the command:

$ python .

The generated images can be fund in the paintings directory.

To finetune the algorithm you can modify the parameters in the __main__.py file.

Contributing

This project is open for any kind of contribution from anyone.

Steps

  1. Fork this repository
  2. Create a new branch (optional)
  3. Clone it
  4. Make your changes
  5. Upload them
  6. Make a pull request here

Examples

These test were taken with these parameters:

POP_SIZE = 100  # Number of starting images
PERSON_SIZE = (32, 32,)  # Size of images

The EPOCH parameter varies row by row.

No. of evolution steps Best (brightest) painting Worst (darkest) painting Time to finish
16 16b 16w 00:03
32 32b 32w 00:06
64 64b 64w 00:12
128 128b 128w 00:24
256 256b 256w 00:48
512 512b 512w 01:37
1024 1024b 1024w 03:18

On average 5.25 it/s.

Their improval with each step:

ep16 ep32 ep64 ep128 ep256 ep512 ep1024

Authors

Hire me on fiverr!

License

Copyright © 2022 Martin Kondor.

See the LICENSE file for details.