Create AI Art in three easy steps
Tags: ai, machinelearning, deeplearning, art
Published: 2021-12-20 19:34:39

---
title: Create AI Art in three easy steps
published: true
date: 2021-11-21 19:06:33 UTC
tags: artificialintelligence,machinelearning,deeplearning,art
canonical_url: https://jamesmiller.blog/ai-art/
cover_image: https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2021/10/me.png
---

Recently a good colleague and friend of mine, showed me how to create AI Art using a Tensor Flow Neural style Transfer algorithm in Google Colab.

Unlike other uses of [Machine Learning that require a developer](https://jamesmiller.blog/training-ai-with-tensorflow-js/), it turns out that creating art using AI is super duper easy and doesn’t need you to be a ‘coder’!

In this tutorial, I will go step by step on how to create your own AI Art, so that you can do the same ![🙂](https://s.w.org/images/core/emoji/13.1.0/72x72/1f642.png)

## Instructions to create AI Art

### Step 1

Visit this Tensorflow [Style Transfer](https://www.tensorflow.org/tutorials/generative/style_transfer) Machine learning model and click ‘Run in Google Colab’ button.

![A screenshot of the Tensorflow 'Style Transfer' page, see the 'Run in Google Colab' button - which you need to click on.](https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-11-21-at-19.07.22.png?resize=640%2C430&ssl=1)
_A screenshot of the Tensorflow ‘Style Transfer’ page, see the ‘Run in Google Colab’ button – which you need to click on._

### Step 2

Once loaded, scroll down the page to the ‘Setup’ section and replace the following:

- ‘ **content\_path** ‘ replace the url + file with an image you’d like to transfer a style onto
- ‘ **style\_path** ‘ replace the url + file of the image you’d like to transfer the style from

![This is what the page will look like once you've clicked to run the algorithm in Google Colab, from here you need to scroll down to the 'Setup' section.](https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-11-21-at-19.07.57.png?resize=640%2C377&ssl=1)
_This is what the page will look like once you’ve clicked to run the algorithm in Google Colab, from here you need to scroll down to the ‘Setup’ section._

![The Setup section of the page, be sure to update the content_path with the image you'd like to change the style of and style_path with the image whose style you'd like to apply to the content.](https://i1.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-12-12-at-12.45.46.png?resize=640%2C303&ssl=1)
_The Setup section of the page, be sure to update the content_path with the image you’d like to change the style of and style_path with the image whose style you’d like to apply to the content._

![](https://i1.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-12-13-at-08.24.34.png?resize=640%2C55&ssl=1)
_Here is an example of what the content_path and style_path lines look like when editted._

## Step 3

Scroll back up to the top and press the arrow button next to the ‘Neural style transfer’ header and then click the play button to run the algorithm

![Scroll back up to the top of the pagea and click on the arrow to the left of the title 'Neural style transfer' to collapse the content and reveal the play button. Click on that play button to start the algorithm.](https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-11-21-at-19.09.52.png?resize=640%2C73&ssl=1)
_Scroll back up to the top of the page and click on the arrow to the left of the title ‘Neural style transfer’ to collapse the content and reveal the play button. Click on that play button to start the algorithm._

## Results

If you click the arrow to the left of ‘Neural style transfer’ to uncollapse the content and scroll down the page, you will see the result of the algorithm.

In my case, I used my profile photo as the content image and tried two experiments where I swapped the style image.

#### Experiment 1

![AI Art content and style images for experiment 1.](https://i0.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-11-21-at-19.57.08-1.png?resize=640%2C312&ssl=1)
_In experiment 1, I used Vassily Kandinsky’s ‘Composition, VII, 1913’ as the style image._

![AI Art result from experiment 1.](https://i1.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/image-7.png?resize=404%2C404&ssl=1)
_The result here is good, the patterns from the style image were successfully found and replicated onto the content image._

#### Experiment 2

![AI Art content and style images for experiment 2.](https://i1.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-11-21-at-19.57.08.png?resize=640%2C312&ssl=1)
_In experiment 2, I googled a water colour texture as the style image (I couldn’t find the exact one I found for this experiment)_

![AI Art result from experiment 2.](https://i2.wp.com/jamesmiller.blog/wp-content/uploads/2021/12/Screenshot-2021-11-21-at-19.57.17.png?resize=404%2C398&ssl=1)
_The result here was less exciting, this is probably because the patterns that the algorithm found were not as clear as the Kandinsky art piece, and therefore the result is more of a blue blur._

Hopefully this post helps you in understanding how to practically create AI Art, I might create a post about the theory of it another time.

In the meantime, have a happy christmas and new years ![😀](https://s.w.org/images/core/emoji/13.1.0/72x72/1f600.png)