AI ARTS- Week 10- Style Transfer – Eszter Vigh

Training this project was difficult and resulted in several failed download attempts of the data set. The ultimate solution to this problem was manually downloading the two files and then manually unzipping both.

I have throughly taken screenshots of my failed attempts.

As you can see, despite my best efforts and several different time tests, there was no way to successfully download this assignment without hacking it (the computer science way, special thanks to Kevin!)

Monet
Style Image

Now, when it came to the image I wanted to use, I selected Monet’s Water Lillies. I thought it would work well since it has strong stylistic elements. Now, this too failed. I couldn’t actually get an output. I am going to continue working with this issue next week to see if I can’t get an actual result. Test fail

This is my actual transfer failure! ^

fails

I was hopeful, but honestly, I can’t restart this again… after spending an entire week just trying to get the model downloaded.

another fail

You can see the manual unzipping!

failure

This is all samples of the manual code I used to try to make this happen! ^

fail

This alone took half the day! ^

I quit

Finally some success! ^

further failure

My constant checking to make sure this way didn’t quit! ^

failed

These were y attempts using Aven’s method! ^

I think there is potential to make it work. I am going to retry until I get some results. When I have those results I will add them here. 

Week 10 Assignment: Style Transfer — Crystal Liu

Model training

I choose this painting from Picasso as the target style and use cd image_path and qsub image_name colfax to upload this image to my devcloud. 

But when I submitted my training task, I couldn’t see the expected result. Professor checked and found that I didn’t have the local train.sh. So I created one and upload it to the devcloud. This time it worked and then I downloaded the model by using scp -r colfax:train_style_transfer_devCloud/models 111(my name). At first, I did this on the devcloud platform, so I failed to download the model. Then I realized that I should download the model on the local terminal and got my model successfully.

Application

I changed the original code to apply my own model and got this:

This image is abstract and is quite different from my original image, but it looks funny. Also, the canvas isn’t smooth when the style is changed. I think  the reason might be the huge calculation like my midterm project. I thought this was simple because I could only change the style by pressing the space. Thus, I added poseNet model to use the pose to replace space. When the coordinates of the user’s nose reached a certain range, the style will change. However, every time I changed my position, the style would change from the original one to Picasso style. Therefore, it looked so weird and it blinked. So I had to give up this method and still applied the keyPressed function. 

But it inspired me a lot for my final project. Maybe I can use the pitch or tone of sound to trigger the change of the style so that it can enrich the visual output. For example, if the tone is high enough, the style will transfer to another one. However, the precondition is to solve the problem of stuck live video.

Week 10 Assignment: Train & inference style transfer — Lishan Qin

For this week’s assignment, I trained a style transfer model with the painting below.

The biggest difficulty I met when training this model is that since the internet is extremely unstable, I failed again and again when downloading the model for training. I tried at least 10 times and finally manage to download that at 2 am in the morning…Other than that the procedures are smooth and I finally have a general understanding of what those commands do with the help of Aven. The output for the trained model is as follows.

(The style transfer can be triggered by a loud sound)

It’s only after I saw the output did I realize that I probably chose the wrong picture to train. Since the image is black and white, so is the output, which makes it hard for me to identify the similar pattern. Originally I want the output image to have the similar drawing line pattern as the input. However, I think  such detailed imitation requires more training. I should have chosen an image with an obvious color pattern that is easier to observe in output image…Still, I guess the pattern of black, white and gray lines shown in the output is somewhat noticeable, even though it’s not as  obvious as I hope.

Overall, it’s a very interesting experiment. I think it helps me a lot to understand how the style transfer process works and allows me to get my hand on to train a model. I also tried using different signals to trigger the style of the web to change, such as using p5’s pitch detection. The style of the web cam image will change when the mic reaches certain volumn. I also hope I can apply this process of training style transfer model in my final project. The style transfer model can be used to generate different characters or battle scene with same style and theme for my battle game. 

Train & inference style transfer – Ziying Wang (Jamie)

Model Development:

For this week’s model, I picked a popart image as my style image.

The model training process didn’t start smoothly since the download is constantly breaking down. After that, I uploaded my train.sh file to the DevCloud and started training. I didn’t realize that I already successfully uploaded my train.sh file and summited the training multiple times so I started the training three times, but I ended up getting a trained model after less than 24 hours. 

The result didn’t turn out as well as I had expected:

Pros: I can tell the basic lines and shapes that outline my figure. The shapes of the lines are similar to the ones in the style image.

Cons: The original picture has colors with high contrast, the trained image barely has different colors other than the carnatio, the black and a bit of yellow and blue. Considering these are all the colors from the style image I used, I assume that if my style image consists of more colors, the trained model will contain more colors. 

Video:

Two experiments:

Experiment A:

I tried to connect this new model with the PoseNet model. The GAN model uses the keypressed function to control the transition between the styled image and the camera image. I implemented the PoseNet model in and programmed it to switch between styles when the left and the right wrist positions match. The code works, but not as I imagined since when it switches between styles, the user can’t keep the two coordinates the same. Even when I left some space for the condition (for example, as long as the distance is within 50px it is considered a switch), the transform still glitches all the time.

Experiment B:

I implemented Crystal’s trained GAN model and PoseNet in my model. Trying to make a project that when one person is detected, it shows the style of my GAN model, when two people are detected, shows Crystal’s style, when more than two people are detected, presents the camera footage. Through console.log, I know that my code should work just fine, whereas the actual image is heavily stuck on the webpage. I assume that the three models are too much for my laptop to run. 

Week 10: Style Transfer (Cassie)

For this week’s assignment, I decided to train the style transfer model with one of Jackson Pollock’s paintings:

The reason I chose to use this painting, besides the fact that I like Jackson Pollock, is that when I was considering using style transfer for my midterm project, Professor Aven mentioned that images that have bright colors and very defined shapes would work the best. While this piece doesn’t really have very defined shapes, the colors are still pretty different from each other.

After the model was trained, I put it into the styletransfer style.js code from Professor Aven’s github to test the output through the webcam. This was the result:

The shapes generated were interesting, kind of like a honeycomb. The colors somewhat matched the source image, but it also seems like some new slightly different colors were generated. If I saw this image without knowing how it was made, I wouldn’t think that it had anything to do with Jackson Pollock, though.

Now…what to do with this? I was really inspired by Roman Lipski’s Artificial Muse in how he incorporates his own paintings and combines them with his algorithm so that the role of artist is split equally between human and machine. This whole style transfer process also reminded me a lot of when I was first learning how to draw and paint: my art teacher would always give us some references that we would just straight up copy to try and improve our own skills. Combining these two ideas, what would it look like if I tried to paint my own Jackson Pollock painting, and then show that painting to the Pollock-trained style transfer? What would the combination of a human replicated Pollock painting and a machine replicated Pollock painting style look like?

I first attempted (key word: attempted) to paint the Pollock painting on a small canvas:

I then held the painting up to the webcam with the trained model, which created this output:

The colors are a bit duller, and the strokes are smoother. However, the whole thing is kind of blurry and there is this faint bumpy grid pattern over the whole image. I kind of like these effects because they would be difficult to achieve with paint on canvas – they very much digitize the style.

Overall, this was an interesting experiment and I think this concept is something I would potentially want to further explore for the final project.