A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural...

14
A Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented by Weidi Xie (1st Oct 2015 )

Transcript of A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural...

Page 1: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

A Neural Algorithm of Artistic Style

Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge

Presented by Weidi Xie (1st Oct 2015 )

Page 2: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

What does the paper do?

• Create artistic images of high perceptual quality.

• The key observation: the representations of content and style of an image in the Convolutional Neural Networks are separable.

• Use a pre-trained VGG-19 (average pooling) to find another image simultaneously matches the content of a photograph and the style of a piece of art work.

(Simonyan & Zisserman, 2015)

2

Page 3: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Related Papers:

1. A Parametric Texture Model Based on Joint Statistics of Complex Wavelet Coefficients. Portilla, J., & Simoncelli, E. P. Int. J. Comput. Vis. 40, 49-70 (2000)

— Match four distinct families of statistics, but only use Wavelet-based pyramid decomposition of the image.

2. Texture Synthesis and The Controlled Generation of Natural Stimuli Using Convolutional Neural Networks. Gatys, L. A., Ecker, A. S., & Bethge, M. NIPS (2015)

3. Understanding Deep Image Representations by Inverting Them. Mahendran, A., & Vedaldi, A. CVPR (2015)

— Style representation.

— Content representation.

— Joint ( Correlation ) statistics were introduced.

3

Page 4: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Style of an art work (Textures) ?

Gatys, et al. 2015 Portilla & Simoncelli, 2000

• Style representation: correlations between the different filter responses over the spatial extent of feature maps.

• Synthesize texture by matching correlation matrices calculated from different layers.

— Provide colours and local structures.

4

El =1

Norm

X

i,j

(Glij �A

li,j)

2

Lossstyle =LX

l=0

wlEl

Cost for style reconstruction

Accumulate cost forlower layers

• Key equations: (Check paper for notation)

Gl = F l(F l)T Correlation matrix

F 2 64⇥ 1000064

100100

Page 5: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

More Results:

Original Up to Conv1_1 layer Up to Pool1 layer

Up to Pool2 layer Up to Pool3 layer Up to Pool4 layer

5

Page 6: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

More Results:

Up to Pool4 layer

Up to Pool4 layer (only Conv layers)

Up to Pool5 layer (only Conv layers)

Original

Original (My result )

6

Page 7: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Content of a photograph

Mahendran & Vedaldi, 2015

— Higher layers in the network capture the high-level content in terms of objects and their arrangement.

— Reconstructions based on high-layer feature maps preserve global arrangement, but does not constrain the exact pixel values.

• Refer to the feature responses in higher layers of the network as the content representation.

Reconstruction based on feature responses of different layers.

7

Page 8: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Content and Style

conv1_1 conv2_1 conv3_1 conv4_1 conv5_1

conv1_1conv1_1conv2_1

conv1_1conv2_1conv3_1

conv1_1conv2_1conv3_1conv4_1

conv1_1conv2_1conv3_1conv4_1conv5_1

8

Page 9: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Combine content and style

• Loss function is defined as : (Check the paper for notations)

↵ � and are the weighting factors for content and style reconstruction.

Loss

content

=1

2

X

i,j

(F l

ij

� P

l

ij

)2

Lossstyle =LX

l=0

wlEl

Loss

total

= ↵L

content

+ �L

style

9

Page 10: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Combine content and style (My result)

Used for Content

Used for Style

↵/� = 10�3 ↵/� = 10�4 ↵/� = 10�5

10

Page 11: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Combine content and style

↵/�Decrease

Used for Content

Used for Style

11

Page 12: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Multiple style 12

Page 13: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Appendix:— A functional and perceptual signature of the second visual area in primates google scholar. Jeremy Freeman, Corey M Ziemba, David J Heeger, Eero P Simoncelli & J Anthony Movshon. Nature Neuroscience (2013)

a. Original Image.

b. Spectrally matched noise images. Only analyzed with linear filters and energy filters, tuned to different orientations, spatial frequencies and spatial positions.

c. Naturalistic texture images. Correlations are computed by taking products of linear and energy filter responses across different orientations, spatial frequencies and positions

13

Page 14: A Neural Algorithm of Artistic Style - University of Oxfordvgg/rg/slides/weidi_rg.pdfA Neural Algorithm of Artistic Style Leon A. Gatys, Alexander S. Ecker, Mattthias Bethge Presented

Portilla & Simoncelli, (2000)

• Wavelet-based pyramid decomposition of the image.

• Four distinct families of statistics:

— Pixel statistics.

Consider low layers, the correlation matrix records edge co-occurrence across: 1. Position (Does a particular edge continue in a straight line or a corner?)2. Orientation (Do vertical edges tend to co-occur with horizontal edges?)3. Scale (Is a small-scale edge part of a larger structure at a coarser scale?)

— Relative phase

— Correlation coefficients

— Magnitude Correlations

Representation of the distribution of the raw intensities present in the original stimulus.

Periodicity, or the degree to which a pattern repeats.

Measure the relative phase of wavelet features between neighbouring spatial scales within the pyramid decomposition of the target image.

14