Neural Style Transfer

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/phoenix198425/article/details/79955322

Concept

Content C + Style S = Generated image G

What are Deep ConvNet Learning?

More abstract features in deeper layer.

Cost Function

loss(G;C,S)=αlosscontent(S,G)+βlossstyle(C,G)

Content Cost Function

  • Say you use hidden layer l to compute content cost.
  • User pre-trained ConvNet.
  • Let a[l](C) and a[l](G) be the activation of layer l on the images.
  • If a[l](C) and a[l](G) are similar, both images have similar content.

losscontent(S,G)=12a[l](C)a[l](G)2

Style Cost Function

  • Say you use hidden layer l to compute style cost.
  • Define style as correlation between activation across different channels.
  • Style Matrix G[l]:
    Let ai,j,k[l]= activation at (i,j,k) . Let Gk,k[l]=i=1nh[l]j=1nw[l]ai,j,k[l]ai,j,k[l],1k,knc[l]

lossstyle[l](C,G)=G[l](S)G[l](G)F2
lossstyle(C,G)=l=1Lβ[l]lossstyle[l](C,G)

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页