You can download the latest release using pip.
pip install circle-evolution
You can easily start training an image by calling circle_evolution from your terminal
Example:
circle_evolution "Mona Lisa 64.jpg" --size 1 --genes 256 --max-generations 50000
Parameter | Description |
---|---|
--size | Image size {1: (64, 64), 2: (128, 128), 3: (256, 256)}. Default: 2 |
--genes | Number of circle to fit. Default: 256 |
--max-generations | Number of generations to run. Default: 500,000 |
from circle_evolution import evolution
from circle_evolution import helpers
import numpy as np
import cv2
target = helpers.load_target_image("Mona Lisa 64.jpg", size=(64, 64))
e = evolution.Evolution(target, genes=256)
e.evolve(max_generation=50000)
helpers.show_image(e.specie.phenotype)
np.savetxt("Checkpoint.txt", e.specie.genotype)
cv2.imwrite("OuputImage.jpg", e.specie.phenotype)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Ahmed Khalf ahmedkhalf
Guilherme de Amorim guimorg