https://github.com/iver56/emoji-art-generator
Use a genetic algorithm to evolve an image by putting emojies on a canvas
https://github.com/iver56/emoji-art-generator
art emoji genetic-algorithm mosaic mosaic-images
Last synced: 3 months ago
JSON representation
Use a genetic algorithm to evolve an image by putting emojies on a canvas
- Host: GitHub
- URL: https://github.com/iver56/emoji-art-generator
- Owner: iver56
- Created: 2019-02-05T20:40:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-20T05:47:39.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T23:12:21.142Z (4 months ago)
- Topics: art, emoji, genetic-algorithm, mosaic, mosaic-images
- Language: Python
- Homepage:
- Size: 14.2 MB
- Stars: 78
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Emoji Art Generator
| Description | Image |
| ----------- | ----- |
| Target image |  |
| RGB MSE fitness |  |
| LAB MSE fitness |  |
| LAB Delta E CIE 2000 fitness |  |
| LAB Delta E CIE 2000 combined with SSIM fitness |  |
| SSIM fitness |  |# Setup
* `conda env create`
# Usage
Prepare a target image (store it in `data/target_images/`) and a set of emojies/tiles (store them in `data/emoji/`). Then run the following command:
`python -m app.generator.generate`
```
usage: generate.py [-h] [--starting-canvas STARTING_CANVAS] [--target TARGET]
[--fitness {RGBMSE,LABDeltaESSIM,LABMSE,LABDeltaE,SSIM}]
[-g NUM_GENERATIONS] [-p POPULATION_SIZE] [--width WIDTH]
[--height HEIGHT] [--emoji-size EMOJI_SIZE]optional arguments:
-h, --help show this help message and exit
--starting-canvas STARTING_CANVAS
Path to an image to start with. If not specified, a
white image will be used.
--target TARGET Filename of target image. Should reside in
data/target_images/
--fitness {RGBMSE,LABDeltaESSIM,LABMSE,LABDeltaE,SSIM}
Choose fitness evaluator. See fitness.py for more
information.
-g NUM_GENERATIONS, --num-generations NUM_GENERATIONS
-p POPULATION_SIZE, --population-size POPULATION_SIZE
--width WIDTH If specified, resize the target image (and the
starting canvas) to this width. Otherwise, keep the
original width.
--height HEIGHT If specified, resize the target image (and the
starting canvas) to this height. Otherwise, keep the
original height.
--emoji-size EMOJI_SIZE
```