Born in 2022, my ai-nigma project aims to creatively and recreationally exploit images generated by artificial intelligence. It was essential to me to work on a comprehensive project that imbues AI image generation with artistic meaning.
No time to read? In a nutshell: I prompted hundreds of images with AI, and then wrote a program to assemble them all graphically as tiles to result in something else when seen from far. See the result at the end of this page.
Even before the inception of the ai-nigma project, my initial generated images lacked an artistic purpose. My use was primarily illustrative, or simply to explore the capabilities of models like MidJourney, Dall-E, and others.
However, as I continued to work with AI, I discovered a “wild” and aesthetic aspect that I wanted to harness by creating a “collaborative” work between AI and my own ideas.
I became passionate about the world of image generation, and I began generating images on a massive scale for an artistic project that, initially, had very vague contours. At the beginning, I wasn’t even sure how to present the results: should they be grouped (improbable situations, impossible things), organized by theme, perhaps a mosaic of colors, or maybe with no rules at all? As the number of images grew, I realized that a new idea was needed.
The “ai-nigma” project really took on a more concrete form in the summer of 2023: collecting a significant number of images to compose a synthetic work made up of these images. Exciting, right? That summer, I believe I was among the few people on the beach inventing image composition algorithms. The main outlines were established, but I needed many more images to bring the idea to fruition.
It was as much a creative endeavor as it was stimulating: in the morning, I would think, “Imagine a ruin of a giant underwater chess game”… And when I returned home in the evening, I would run multiple experiments, initially with little success, until I mastered the subtleties of prompting and formulating the right queries. The subjects were endless, ranging from improbable situations (the leaning twin towers of Pisa), object fusions (a banana with a zipper, easy to open), historical references (a 18th-century internet console), to people doing whimsical and forbidden things…
In the beginning, I attempted to compose the final image without a clear idea, but quickly the concept of creating a face became apparent. The initial attempts were mediocre, and I soon realized that I needed the assistance of computers.
The idea of a “target” image emerged, and given the size of the “tiles” generated by the AI (1024×1024) and the possibilities for printing, it became evident that I shouldn’t exceed 4cm x 4cm per tile to maintain readability in a reasonable size for the complete artwork. I experimented with divisions of 18×18, 20×20, 25×25, and 28×28, up to 32×32. The initial divisions didn’t highlight the final image, and the latter ones were too ambitious in terms of the final size of the artwork, going beyond 1.5m x 1.5m if one wants to keep the tiles at least 4cm in size…
The “target” image before and after its reduction to 25 x 25 tiles – the image itself is generated by AI.
I used my programming knowledge to write my ai-nigma algorithm, which composes the final image from my collection of samples (the tiles, where each tile is an image generated by AI). I exclusively used open-source tools within my preferred programming language, C++. All attempts to use AI to assist me to generate C++ code that performed what I want simply failed. Nice try. Same player shoots again. But that’s no wonder: Try asking MidJourney to produce an image of a person playing a trumpet but from the wrong side : it would yield nothing because there are no existing samples. The same goes for the code that would assemble the images according to my specifications. So, I relied on my human brain… it still happens to work.
My algorithm gathers all candidate images present in a directory of my choice (the result of collaborative creativity with AI) and sorts them by perceived brightness intensity. For instance, I need 625 candidate images to create a 25×25 tiled result image, and each tile gets assigned a brightness value.
Next, the algorithm loads the target image (for instance, an image of a face to be assembled) and reduces it to a mosaic of 25×25 tiles. The algorithm’s objective is then to find, for each tile to be filled, an image issued from the portfolio of 625 potential candidates. Since the candidates have been sorted by brightness, this process is straightforward…
The ai-nigma algorithm searches for the best matches for each of the images to be placed in the final composition…
I quickly realized that the result didn’t meet my expectations. My initial algorithms processed line by line and naturally assigned the best candidates at the beginning of the image. An improvement was to distribute the error more evenly across the entire image by proceeding randomly. Then, I fine-tuned my ai-nigma algorithm (now v5) to arbitrate between two equal candidates based on the shapes present. If two candidates have the same brightness, the algorithm will give the place to the image that adds continuity to the major features and lines of the face. It’s easy to say, much less easy to implement, but the result is visible below.
As the ai-nigma algorithm underwent optimizations, the result improved…
The Random Permutations
The random aspect remains fascinating. The ai-nigma algorithm is capable of generating images of equivalent quality while randomly permuting tiles, ensuring almost unique prints, and their value is linked to this uniqueness.
The permutations are so subtle that on the right image, they are not immediately visible…
I can also incorporate specific images into the tiles (a real pictures of wedding or birthday for example. it will find its place among the hundreds of other AI-generated images according to its hue and global color) – and/or generate images with a different target, or even another pattern, such as an eye in the example below:
Results of generating a different final target like an eye or different faces….
go and see now the ‘ai-nigma’ final result in a virtual gallery :