Artistic Style Algorithm of A...

27
Presented by Jackie Chu arXiv 2015 A Neural Algorithm of Artistic Style Leon A. Gatys et. al

Transcript of Artistic Style Algorithm of A...

Page 1: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Presented by Jackie ChuarXiv 2015

A Neural Algorithm of Artistic Style

Leon A. Gatys et. al

Page 2: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

The Question

MASP Art School campaign done by DDB Brazil

Google search on “images”

Can we apply any style to any content?

Page 3: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

“Previous Work”

Print by James Hance

http://thirddime.com/blog/10_awesome_lego_versions_of_famous_paintings/

http://www.artfido.com/blog/artist-photoshops-her-fat-cat-into-famous-artworks/

Page 4: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Previous Work: Learning Styles

Karayev, Sergey, et al. "Recognizing image style." arXiv (2013).

“We also show that style is highly content-dependent.”

Page 5: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Contributions

● Learn best pairing between content and style

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 6: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Contributions: Visual Results

https://youtu.be/cB84sgqlkR4?t=27 https://www.youtube.com/watch?v=g9BxlwlQWlc

Page 7: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology

● Leverage CNNs ○ Trained for object recognition

● Jointly learn content and style○ Texture synthesis captures style

○ Separate representations of content and style

○ Recombinations of content and style based on loss functions

Page 8: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

MethodologyVery Deep ConvNets (VGG)

● Key factors: small kernels, stride of 1, ReLU, deeper depths

Slides at http://www.robots.ox.ac.uk/~karen/pdf/ILSVRC_2014.pdf

Page 9: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Very Deep ConvNets (VGG)

● Key factors: small kernels, stride of 1, ReLU, deeper depths

Methodologyaverage pooling

averagepooling

averagepooling

averagepooling

averagepooling

Slight modifications:

Slides at http://www.robots.ox.ac.uk/~karen/pdf/ILSVRC_2014.pdf

Page 10: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology

● More flexibility!● Content and style trained separately (for the most part)

○ Cannot have perfect synthesis → loss functions with its parameters

Page 11: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 12: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 13: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 14: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Loss Function: Content

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

● p - original image● x - generated image● F - responses stored in matrix ● P - feature representation of original image● i,j - ith position, jth filter

Page 15: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Loss Function: Content

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 16: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 17: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 18: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Methodology: Texture Synthesis● As previously seen:

○ Create textures from feature representations

○ Discriminative○ Captures salient features○ Also uses VGG architecture

Gatys, Leon, et al. "Texture Synthesis Using Convolutional Neural Networks." arXiv (2015).

Page 19: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Loss Function: Style

● G - content representation● A - style representation● a - original art image● N, M - N feature maps of size M ● w - weight factors of layer l● E - style loss at layer l

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 20: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Loss Function: Style

● G - content representation● A - style representation● a - original art image● N, M - N features map of size M ● w - weight factors of layer l● E - style loss at layer l

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 21: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Loss Function: Style

● wl = 1/numActiveLayers with non-zero loss weight wl

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 22: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Loss Function: All together

● α and β are parameters to control regularization

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 23: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Loss Function: All together

● α and β are parameters to control regularization● alpha / beta

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 24: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Content/Style Representations10-5 10-2

Conv1_1

Conv5_1

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 25: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Content/Style Representations

● Content represented in lower layers

10-5 10-2

Conv1_1

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 26: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Content/Style Representations

● Style represented in feature space○ local arrangements, textural information

10-5 10-2

Conv5_1

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).

Page 27: Artistic Style Algorithm of A Neuralweb.cs.ucdavis.edu/~yjlee/teaching/ecs289g-fall2015/jchu2.pdf · Loss Function: Style G - content representation A - style representation a - original

Conclusions

● Learn best pairing between content and style○ (Mostly) separable

Gatys, Leon, et al. "A Neural Algorithm of Artistic Style." arXiv (2015).