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. 

Leave a Reply