What is it
图像风格迁移,可以生成特定风格的图像,例如由下面的图像Content生成图像Genrated Image G。
How does it Work
Cost Function=α*Content Cost Function+β *Style Cost Function
Content Cost Function
Style Cost Function
In neural style transfer, what is updated in each iteration of the optimization algorithm?
Then we’ll define the cost function J of G on the previous slide. What you can do is use gradient descent to minimize this so you can update G as G minus the derivative respect to the cost function of J of G. In this process, you’re actually updating the pixel values of this image G which is a 100 by 100 by 3 maybe rgb channel image. Here’s an example, let’s say you start with this content image and this style image. This is a another probably Picasso image. Then when you initialize G randomly, you’re initial randomly generated image is just this white noise image with each pixel value chosen at random. As you run gradient descent, you minimize the cost function J of G slowly through the pixel value so then you get slowly an image that looks more and more like
your content image rendered in the style of your style image. In this video, you saw the overall outline of he Neural Style Transfer Algorithm where you define a cost function for the generated image G and minimize it. Next, we need to see how to define the content cost function as well as the style cost function.
思维导图
参考
- https://arxiv.org/pdf/1508.06576.pdf
- Andrew NG深度学习课程:Convolutional Neural Networks