项目
在 GitHub 查看
gsurma/style_transfer
关于
CNN image style transfer 🎨.
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Style Transfer
Style Transfer is a process in which we strive to modify the style of an image while preserving its content. Given an input image and a style image, we can compute an output image with the original content but a new style.
Check out corresponding Medium article:
Style Transfer - Styling Images with Convolutional Neural Networks
How does it work?
- We take input image and style images and resize them to equal shapes.
- We load a pre-trained CNN (VGG16).
- Knowing that we can distinguish layers that are responsible for the style (basic shapes, colors etc.) and the ones responsible for the content (image-specific features), we can separate the layers to independently work on the content and style.
- Then we set our task as an optimization problem where we are going to minimize:
- content loss (distance between the input and output images - we strive to preserve the content)
- style loss (distance between the style and output images - we strive to apply a new style)
- total variation loss (regularization - spatial smoothness to denoise the output image)
- Finally, we set our gradients and optimize with the L-BFGS algorithm.
Results
Input
Style
Output
1 iteration
2 iterations
5 iterations
10 iterations
15 iterations
Other examples
Author
Greg (Grzegorz) Surma
探索相关项目
加载中…