09.05.2023 Views

pdfcoffee

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Advanced Convolutional Neural Networks

For instance, go to https://deepart.io/ and see a cool demo as shown in the

following image, where DeepArt has been applied by taking the "Van Gogh"

style as observed in the Sunflowers painting and applying it to a picture of my

daughter Aurora:

Now, how can we define more formally the process of style transfer? Well, style

transfer is the task of producing an artificial image x that shares the content of

a source content image p and the style of a source style image a. So, intuitively

we need two distance functions: one distance function measures how different the

content of two images is, L content

, while the other distance function measures how

different the style of two images is, L style

. Then, the transfer style can be seen as an

optimization problem where we try to minimize these two metrics. As in Leon A.

Gatys, Alexander S. Ecker, Matthias Bethge [7], we use a pretrained network to

achieve style transfer. In particular, we can feed a VGG19 (or any suitable pretrained

network) for extracting features that represent images in an efficient way. Now we

are going to define two functions used for training the network: the content distance

and the style distance.

Content distance

Given two images, p content image and x input image, we define the content

distance as the distance in the feature space defined by a layer l for a VGG19 network

receiving the two images as an input. In other words, the two images are represented

by the features extracted by a pretrained VGG19. These features project the images

into a feature "content" space where the "content" distance can be conveniently

computed as follows:

[ 166 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!