Generative Adversarial Networks (GANs): Artistic Creation with an AI Collaborator

Generative Adversarial Networks (GANs): Artistic Creation with an AI Collaborator

Grade 9 - Grade 12

Briana Brownell

Briana Brownell

About the author

Briana Brownell is a Canadian data scientist and technology artist. Her technology-enhanced creative projects span multiple areas, including AI-assisted Shakespearean sonnets, and AI-enhanced, assisted and generated visual art pieces.

Jessa Gamble

Jessa Gamble

About the author

Jessa Gamble is an internationally award-winning science and technology journalist and Penguin Random House author. Her writing has appeared in The Atlantic, Nature, New Scientist and The Guardian.

Introduction

A generative adversarial network (GAN) is a pair of duelling systems playing a game. The discriminative network has been trained to recognize, or discriminate among, types of data. The generative network creates novel examples and tries to fool the discriminating network into accepting them. Since their invention by a Google team in 2014, GANs have been used for everything from hyper-realistic images for computer games to high-energy physics simulations. 

This lesson provides online resources that allow students to create music, visual art or other creative output using GANs.

Learning Goals

  • Create an audio-visual project using artificial intelligence (AI)
  • Morph an image into a style of artwork using AI

Vocabulary

Generative Adversarial Networks (GANs)
An approach to generative modelling using deep learning methods, such as convolutional neural networks. Generative modelling is an unsupervised learning task in machine learning that involves automatically discovering and learning the regularities or patterns in data in such a way that the model can be used to generate or output new examples that  could have been plausibly drawn from the original dataset.

Guiding Questions

  1. Do you know any examples of AI being used for creative projects?
  2. Is there a place for AI in creating visual artworks?

Curriculum Links

This module aligns with provincial and territorial Computer Studies curricula as it provides opportunities for students to explore emerging areas of computer science research. In addition, through the Visual Arts curriculum, students have the opportunity to explore and experiment with a variety of media and materials, as well as traditional and/or emerging technologies, tools and techniques, and apply them to produce artworks.


Materials


Computer Activity

Activity 1: Make an Audio-Visual Masterpiece with an AI Collaborator

  1. Select a song file or other audio file (an MP3 of under 15 minutes in length).
  2. Go to the WZRD website. Name your project and enter your song.
  3. Select a visual theme.
  4. Choose the images you want to appear or have them chosen for you by clicking Skip this step.
  5. Autofill images and rearrange them on the timeline as desired.
  6. Render video.
  7. Watch!

Activity 2: Creating Using AI – Deep Style Transfer

Students use their own photos to work in Deep Style Transfer or Deep Dream

  1. Sign up for a Deep Dream Generator account.
  2. Choose a base image. This image defines the base structure of your art piece. Royalty-free images are available from several websites, such as Pexels or Pixabay or you can use your own image.
  3. Choose a style image. This image defines the style of your art piece. You can use a painting or drawing of your own or artworks that are in the public domain—for example, from the National Gallery of Art website.
  4. Examine the resulting image. Can you see which parts of the style image were transferred to your base image?
  5. Using the same base and style images, try changing the style scale up or down and repeat the process.
  6. Repeat the process using different style images.

Example

Base:

Style Image 1:

Source:

Courtesy National Gallery of Art, Washington, DC

Final Image:

Style Image 2:

Courtesy National Gallery of Art, Washington, DC

Final Image 2:

Deep Dream

  1. Sign up for a Deep Dream Generator account.
  2. Choose an image to “dream.” Royalty-free images are available from several websites, such as Pexels or Pixabay, artwork that is in the public domain can be found on the National Gallery of Art website or you can use your own image.
  3. Click Settings and choose a layer.
  4. Examine the resulting image. Are you surprised with the patterns that result?
  5. Using the same base image, choose a different layer and repeat the process.

Examples


Conclusion

Discussion Activity

What is different about this kind of art-making process as compared to painting or drawing? What are its advantages and disadvantages?

In terms of art-making, do you believe AI is:

  • A tool used by a human?
  • A partner of a human?
  • A muse to a human?
  • A creator enabled by a human?

Additional Resources

Additional Resources

Social Media Resources

This lesson plan originally appeared in the fourth issue of Root & STEM, Pinnguaq’s free print and online STEAM resource supporting educators in teaching digital skills