Final Project – Jarred van de Voort – What Would _ See?

Introduction

In an effort to stay true to the title of the class and create something interactive with techniques covered in class, I explored using style transfer. At first the project started off as an extension of my emotion classifier / style transfer midterm. However, I decided to remove the emotion classifier due to performance, and instead focussed on building an interactive experience around the style transfer. Throughout the class, we’d studied artists and painters so I thought it would be an interesting idea to explore how some artists might’ve perceived the world around us. The name of the concept is also partially inspired by aven’s github repo named “what_would_monet_see”. The idea is to perform a style transfer on an input image and use the output as the backdrop of the canvas. A sketch is placed over to represent what an artist might have started with before painting.

Concept

For the user interface, I wanted to provide several options for artist styles, as well as a way to select different images. This required quite a bit of logic to enable users to select a new image, reset any drawings, and select new styles. An example of the UI layout is shown below.

When the user first loads the page, they see several options for painting styles and an input image.

The user must select a painting style before starting to paint. Once a style is selected, a sketch of the image is projected and the user can begin to use their mouse to paint.

The user is also able to cycle through and load different painting styles derived from trained neural style transfer models.

Finally, the user is also able to select different input images to test painting styles. I also included some examples of paintings from several artists to explore how other artists may have painted a similar subject. 

Here’s how Francis Picaba may have painted a starry night

or how Picasso might have painted the great wave

Challenges & Considerations

Since neural style transfers are a relatively new publication, there are limited pretrained models that can be used. I used the neural style training process we established in class to train several models. I also used some technique to dynamically load models to conserve computational footprint while exploring the page. The biggest challenge for displaying and inferencing images is the limitation on client resources. Client based neural style transfer is limited to roughly 300,000 pixels (around 500×600). Therefore a limit on the height and size of images is used to prevent overload.

Future Work

In the future, I’d like to implement several features. The first of which is the ability for users to upload their own images to see how artists may have painted them. In order to do this, a binarization algorithm would need to be developed to create the sketch effect.  I’d also like to add a method to train new painting styles. While this could take hours, implementing some kind of queue for doing such would enable far more painting styles. The last feature would be to add another layer of interactivity using mobileNet so that users to use their hands to paint instead of a cursor. I imagine that something like this would work well as an art installation at a museum. 

Week 12: VanGogh CycleGan – Jarred van de Voort

For our week 12 assignment, we’re asked to create an environment and train a CycleGan. As noted, this could take several days, and good results would require much longer training time. In order to circumvent this, we can use a well trained cycleGan model from the original tensorflow based repo linked below. With the pretrained model saved in as our checkpoint, I stylized several images using the van gogh 2 photo dataset. The results are below:

Github repo:

https://github.com/xhujoy/CycleGAN-tensorflow

Week 10 – Deep Dream exploration

For this week, I’ll be exploring deep dream and tweaking hyperparameters that affect the output of the final result.

I noticed that deep dream tends to perform better on images that are brighter / more saturated, so I found an image of this flower to test with.

Original

Base Hyperparameters

Octaves – 5

mixed02 – 2

Step – .5

Here we see that theres a high amount of noise, suggesting that with a high learning rate too high, we might undershoot the global maximum, leading to a network that doesnt learn anything

Final Project Concept – Everyone’s an Artist 🎨

Concept

My main focus for the final will be to extend my midterm project into a highly interactive, engaging application. The goal is to create an experience that enables users to paint like their favorite artist using a style transfer. The application will need to train several styles based on the artists I choose, as well as a mobileNet for detected the user’s hand position. The following explains the flow of the user experience:

User Experience

  1. Users will be shown a random, binarized image (and have the option to select a new base image)

2. An artist or style can be selected from a range of options to paint the image (Van Gogh, Monet, Cubism, etc.)

3. The original binarized image can then be painted with a mouse, or potentially using their hand detected by mobileNet

3. Once the user has painted the whole image, it can be downloaded. And the user can select a new base image and paint style.

Week 9 – Vietnamese Lunar New Year – Jarred van de Voort

Vietnamese Lunar New Year Portraits

Vietnam shares its own set of lunar new year traditions, cultures, and practices that have survived thousands of years. In light of the past lunar year year, I wanted to use the neural style transfer to generate stylized portraits for different years.

Staring with the source of the style transfer: 

This painting style is famous amongst traditional Vietnamese artists, with very distinct strokes and colors making it a good candidate for style transfer. Using the intel devCloud we can train using this as the source image to generate a model to apply to other images.

Here are some examples:

Year of the Rat – 2020

Year of the Monkey – 2016

Year of the Horse – 2014

You’ll notice that the context of the last image best matches that of the source image, making it a better candidate for generating a portrait. The two prior examples were isolated images that don’t have a background which may lessen the consistency of our style transfer.