[Perfume x STAR WARS] Style conversion with Chainer starting in 1 minute

Introduction

This article is the 14th day article of Useful technology that can be realized in 1 minute Advent Calendar 2015.

Here, mattya's Algorithm for converting style is easy to use. I'll give it a try.

What is style conversion?

For details, please read the original article Algorithm for converting style, but as an overview "Let's use Deep Neural Network to generate an image that converts the style of painting into a style image while keeping the arrangement of the objects written in the content image." It will be like that.

Screen-Shot-2015-09-10-at-2.34.39-PM.png

Screen-Shot-2015-09-10-at-2.35.40-PM.png

Execution environment

Perfume × STAR WARS

Then I will try it immediately. As the subject, I took up "Perfume x STAR WARS". It's a collaboration that is trendy and makes you excited just by thinking about it.

Content image

Perfume animated by Yoshiyuki Sadamoto in a tie-up with Mercedes-Benz last month Perfume becomes the character of Mercedes-Benz, designed by Yoshiyuki Sadamoto perfume.png

Style image

STAR WARS is showing worldwide excitement ahead of the latest screening this week Star Wars | STAR WARS | style.png

Ready to run

pip install chainer cd <working directory> git clone https://github.com/mattya/chainer-gogh.git Download any model (https://github.com/mattya/chainer-gogh)

This is the end of preparation !! The actual processing after this will take quite some time, but I think that you can really "start in 1 minute" as the title says until setup.

Execution result

python chainer-gogh.py -m nin -i perfume.png -s star_wars.png -o ~/Desktop -g -1

im_04950.png

Hmm ... Perfume's face has crumbled, but Star Wars' style has been nicely applied. Chainer is amazing because you can easily play with Deep Learning!

Recommended Posts

[Perfume x STAR WARS] Style conversion with Chainer starting in 1 minute
Conv in x direction and deconv in y direction with chainer
Star Wars release commemoration, Star Wars style TL application made with bottle
Neural network starting with Chainer