iML Week 12: CycleGan Training – Thomas

Introduction

For this week, we had to train a cyclegan model on the Intel AI Devcloud. I created a photo to comic style transfer using a custom dataset collected on the internet. I was inspired by @ericcanete’s instagram artwork, so I created a model using his photos. I also used a dataset from the University of Illinois that was scraped from Flickr and includes portraits of people with a variety of facial expressions and backgrounds. Cyclegan allows us to make image to image translations using two types of training data. I ran the scripts provided to us with some modifications. Training took about 2 days with 112 epochs run. Below is a sample of the training and testing images I used for both domains.

Domain A (1,389 items):

Domain B (1,308 items):

Results

            Left Side: Input Image                          Right Side: Output Image

Conclusion

This was not really a comic style transfer as it was a line art style transfer. Ironically enough, this model does not work well for faces, the thing it was trained on. The black eyes turn into creepy white eyes and the portraits look somewhat spooky. This model is somewhat overkill as there are probably much better algorithms for converting images into black and white. However, it is interesting how we can teach a machine how to do a certain style of art without explicitly teaching it. 

Sources

Comic Art – https://www.instagram.com/ericcanete/?hl=en

Portrait Dataset – http://www.ifp.illinois.edu/~vuongle2/helen/

Training Docs – https://github.com/LynnHo/CycleGAN-Tensorflow-2

Instagram Scraper – https://github.com/rarcega/instagram-scraper

Leave a Reply