Generative Art Synthesizer - a python program that generates python programs that generates generative art

Overview

GAS - Generative Art Synthesizer

Generative Art Synthesizer - a python program that generates python programs that generates generative art.

Examples of images that could be generated with GAS. You can see source code of python programs that reproduce these images by clicking on them.

Idea

In general generative art is mostly produced by stochastic processes. If in the process of generating art piece there was no storage of initial seeds for all random processes and complete information of methods that was used to produce it, there is no way to reproduce the result again. Such possibility comes handy when you want to produce some variation of particularly good results. GAS solves this problem by applying a different approach to art generation. Instead of storing seeds and methods in some sort of artificial data format, GAS generates the entire fully deterministic program that itself produces the image. This allows complete reproducibility for generative art alongside with ease of modification for artistic control.

Dependencies

All dependencies for running gas.py contained in requirements.txt. To set them automatically run

pip install -r requirements.txt

Generated programs depend only on three packages: numpy, os and PIL. Exact versions of these packages indicated in the programs themselves, as well as version of python they were created on.

How to start

To start generative session simply run

gas.py

At the start of the session there will be created a run's folder with time of start of the run as its name. Inside the folder there will be created another folder called "backup" that contains the current version of project files. After that new programs will be generated and executed automatically one by one. Generated programs will create two files - the resulting image and an image of final layers that produced the result (see "Generation method" for more details). There also will be a score at the start of the name of the file that is given by a machine learning model that tries to estimate how beautiful an image is to help to sort them.

NFT Gallery

You can see some of the most interesting images generated with GAS here: https://opensea.io/collection/genas

If you are willing to support the project, you can acquire any NFT out of that collection. Each such NFT contains a python program that generates the image as an unlockable content.

Generation method

In its core GAS image generation process is very similar to other math driven generative art projects where randomly generated functions are used to produce an image. However, GAS uses some strict boundaries for transformation methods, specifically - all methods always defined on [-1,1] range of values and returns only the values within that range. Also, all methods are called in a similar fashion: "x = method(x, **params)". It allows generating programs without too complicated rules that are guaranteed to always terminate.

At the start of the generation process we have some tensor x in shape of (w, h, c) where w and h are width and height of the image we want to produce, and c is an amount of channels we have to store temporary values. We initialize this tensor with a linear combination of x and y that correspond to positions in space. After that we randomly apply methods from a predefined set of methods that transform channels one by one depending on values from other channels.

Finally we take a random number of channels and for each channel define the corresponding color, combine them into a single image and save it.

There are two core methods in use:

Transit - takes a batch of channels and produces a linear combination of them in a way that sum of all channels never escapes [-1,1] range.

Sin - takes single channel and produce

Similarly to Fourier series these two methods can approximate any function that is defined within [-1, 1] range. So, theoretically, we already can generate any possible image with these two methods only, although, probability of getting any interesting result is pretty low. To battle that there are several additional methods defined.

You might also like...
NFT collection generator. Generates layered images

NFT collection generator Generates layered images, whole collections. Provides additional functionality. Repository includes three scripts generate.py

Python Digital Art Generator

Python Digital Art Generator The main goal of this repository is to generate all possible layers permutations given by the user in order to get unique

👾 Python project to help you convert any image into a pixel art.
👾 Python project to help you convert any image into a pixel art.

👾 Pixel Art Generator Python project to help you convert any image into a pixel art. ⚙️ Developer's Guide Things you need to get started with this co

Computer art based on quadtrees.
Computer art based on quadtrees.

Quads Computer art based on quadtrees. The program targets an input image. The input image is split into four quadrants. Each quadrant is assigned an

 Convert Image to ASCII Art
Convert Image to ASCII Art

Convert Image to ASCII Art Persiapan aplikasi ini menggunakan bahasa python dan beberapa package python. oleh karena itu harus menginstall python dan

Convert any image into greyscale ASCII art.
Convert any image into greyscale ASCII art.

Image-to-ASCII Convert any image into greyscale ASCII art.

Computer art based on joining transparent images
Computer art based on joining transparent images

Computer Art There is no must in art because art is free. Introduction The following tutorial exaplains how to generate computer art based on a series

Pixel art as well as various sets for hand crafting
Pixel art as well as various sets for hand crafting

Pixel art as well as various sets for hand crafting

Art directed cropping, useful for responsive images

Art direction sets a focal point and can be used when you need multiple copies of the same Image but also in in different proportions.

Comments
  • Sys version fix

    Sys version fix

    Python sys.version may return "3.8.10 (default, Jun 4 2021, 15:09:15) [GCC 7.5.0]" (with /n instead of one line) so it breaks generation script to work. At least for me. Also I added Poetry project for better dependency control and gitignore for Runs.

    opened by lapaniku 1
Owner
Alexey Borsky
Russian self-taught programmer. Interested in art, procedural generation and generative AI.
Alexey Borsky
Img-to-ascii-art - Converter of image to ascii art

img-to-ascii-art Converter of image to ascii art Latest Features. Intoducing Col

null 1 Dec 31, 2021
Ascify-Art - An easy to use, GUI based and user-friendly colored ASCII art generator from images!

Ascify-Art This is a python based colored ASCII art generator for free! How to Install? You can download and use the python version if you want, modul

Akash Bora 14 Dec 31, 2022
A python program to generate ANSI art from images and videos

ANSI Art Generator A python program that creates ASCII art (with true color support if enabled) from images and videos Dependencies The program runs u

Pratyush Kumar 12 Nov 8, 2022
vsketch is a Python generative art toolkit for plotters

Generative plotter art environment for Python

Antoine Beyeler 380 Dec 29, 2022
Samila is a generative art generator written in Python

Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.

Sepand Haghighi 947 Dec 30, 2022
Using P5.js, Processing and Python to create generative art

Experiments in Generative Art Using Python, Processing, and P5.js Quick Links Daily Sketches March 2021. | Gallery | Repo | Done using P5.js Genuary 2

Ram Narasimhan 33 Jul 6, 2022
Combinatorial image generator for generative NFT art.

ImageGen Stitches multiple image layers together into one image. Run usage: stitch.py [-h] <backgrounds_dir> <dinos_dir> <traits_dir> <texture_file> <

Dinosols NFT 19 Sep 16, 2022
Anime2Gif - an algorithm that detects scenes in a video and generates gifs from it

Anime2Gif Anime2Gif is an algorithm that detects scenes in a video and generates gifs from it. How to use To use it, first, you'll need to install it'

null 1 Dec 9, 2021
Generates images of calendar month tables and can paste them onto suitable photos.

?? calendizer README Generates images of calendar month tables and can paste them onto suitable photos. A quick way to make your own calendar for prin

Sean Ryan 2 Dec 14, 2022
Tool that takes your photo and generates a pixelated color by number photo.

Color by number Tool that takes your photo and generates a pixelated color by number photo. Requirements You need to have python installed on your com

null 1 Dec 18, 2021