What’s a GAN (generative adversarial network), and how can A.I. be used for art?

 
Cover image of Ha.i.kus, Vol. 1: Cycle of Water

GAN-generated imagery from Ha.i.kus, Vol. 1: Cycle of Water

“The story of evolution unfolds with increasing levels of abstraction.”

Ray Kurzweil


For machine learning, and especially GANs, it’s only just the beginning…

There are endless applications for machine learning, a RAPIDLY evolving space expected to surpass $20 billion by 2025 (for context, as of this writing it’s at about $1.5 billion). Artificial intelligence is already embedded in much of our daily lives, from search engines to virtual assistants to virtual reality. There is infinite potential for how A.I. technology can enhance the human experience, and that’s especially true when it comes to art.

Since A.I. is such a vague topic, and one in its infancy of development, let’s focus in on one very unique, tiny corner of A.I. - a machine learning model known as a generative adversarial network, or GAN for short. A GAN is a framework designed to create new samples of data in an evolving learning environment.


How does a GAN work?

Without getting too far in the weeds, a GAN consists of a sample data set with input parameters, and then two networks (outlined below) designed to train one another back-and-forth in a friendly competition of sorts.

  • Network #1 - the generative model

Generates new instances of data based on the original data set and prompt given. Its goal is to get better and better at generating these instances, and tricking the discriminator model into “thinking” the new instances are from the original data set.

  • Network #2 - the discriminative model

Evaluates the accuracy of what was generated against the data set and classifies each instance as either real (from original data set) or fake (rendered by the generator). Its goal is to increase the level of accuracy at which it can tell the difference.

Together, they repeat this process, constantly informing each other as the generator produces better instances of data while the discriminator improves itself at flagging the synthetic samples.

That’s a very basic explanation, but the main point is that these types of models can be designed to learn on their own, and can be tweaked in countless ways in terms of what the starting data set consists of, what's generated and how, as well as how the discriminator is used to score the outputs. While use cases are still in the process of being developed, there’s potential for GANs to assist us across virtually all industries including science, business, economics and, of course, art.

Examples (in the form of Ha.i.kus)

The art community is just getting started with using A.I. to create, and that’s certainly true here at ThoughtPose. For starters, head on over to the Ha.i.kus page, which features poetry written by a human and illustrated by a customized text-to-image GAN.


Try it for yourself

Some tools and resources for experimenting with A.I. creative tools on your own:

NightCafe Studio - This tool allows you to generate images from text, or restyle existing images. You can try for free, and then you will need to buy/earn credits to use the tool further. The number of credits needed per creation varies depending on the settings and criteria you set.

Hotpot.ai - Similar as above in terms of using credits, but with different options and a variety of other A.I. tools beyond text-to-image, such as the ability to write fiction stories, restore old pictures, remove backgrounds from images or designs, translate videos and more. It’s pretty nuts, and an absolute blast to mess around with. They also happen to have excellent and responsive customer service.

A.I. Whisperer - YouTuber and Udemy instructor with easy-to-follow demonstration videos on how to create A.I. art (and even sell them as NFTs). Through his videos, he also shares a few custom GANs (different from how the above tools are programmed) that you can try through Google Colab.