Annette-s-Responses

View on GitHub

Creating Some Art with Neural Style Transfer!

When I first saw this project, I was really excited because I love photography and photoshopping images! I love it so much so that I began a small design business that specializes in goodies such as t-shirts, mugs, water bottles, and more!

I had very few problems with running and altering the code for the first half, but it did crash my computer several times. I was only able to do this on google colab, but the kernel was really struggling and would often freeze. As soon as I got to the stretch goals, I began to get many strange Value Errors whenever I would change the image. Due to the waiting times, I was not able to continue trying to debug that part of the project. I think that my error was related to weights/step size.

image

The First Image: The Northern Lights

The first image I chose was a beautiful image of the Northern Lights. I applied Wassily Kandinsky’s Composition 7 onto the Northern Lights.

image image

This image did not perform well with the tranfer, as high levels of noise and frequency disrupted the tranquility of the image. The image on the left is at 15 epochs with a step size of 50 and weights of 30, while the image on the right is at 5 epochs with a step size of 1 and weights of 30:

image image

As can be seen, a lot of the picture is lost in both of them. Because the picture was completely lost, I ran a frequency plot:

image

I decided to try to make abstract art with the two. Setting 100 epochs with a step size of 100 and a weight of 30, I produced the following image:

image

Although quite pixelated, I really like the results. This model is very overfit; the epochs began to find edges within themselves! In retrospect, this image did not have as much detail as would fit with the transfer, and thus I moved on to better trials!

The Second Image: Mountaineous Terrain

The second image I chose was of a lake with mountains in the background. I absolutely love this image; I would love to build a log cabin exactly where this was taken! The second image I chose was an abstract illustration.

image image

I was very afraid of the results after the last disaster, but the first few steps were very promising, as well as the image with high frequency:

image image

The final image at 12 epochs with a step size of 100 and weight of 30. Once again, the details got a little lost:

image

I decided to try to change the weights from the usual 30 to 1 and 50. There are slight differences visible in the shading:

image image

This image perhaps would have resulted better with less steps, as the tests demonstrated. Too much of the image was swallowed at the settings I chose for the final product.

Testing more Images

I began to play around with images that had more detail after my two failures with landscape pictures. The first image is an illustration of a lion, and the second is a picture I took last week at the botanical gardens. I think illustrations tend to work better for this method, as it is easier to detect lines and edges.

image image

image image

I really love how the lion turned out, as it is one of my favorite animals and a symbol of strength and courage.

Image for JumpStart Data Science T-Shirt

I was really excited for this aspect of the project, as I have been designing t-shirts for many years! Unfortunately, I had a really hard time coming up with a design that looked good with the HD look this method gives an image. After much trial and error, I did find an image that I really love, as it feels both relevant and colorful (I LOVE colors). The image I used was of a robot head with a neural network radiating out of it:

image

I love the color scheme the original illustrator gave it, but with the same transfer images I used above, I made many other versions of it:

image image image

My favorite image is the following:

image

I have many possible ideas for how to put this on a t-shirt and with several texts!