Neural Style Transfer

Kai Wombacher
Deep~Learning (Data 2040) KW
2 min readMay 12, 2018

https://github.com/kwombach/deep-learning

Using ‘Deep Learning with Python’ by François Chollet as a template, we can easily perform neural style transfer with keras. Nerual style transfer uses a pre-trained CNN to transfer the textures, colors, and visual patterns from a ‘style’ image to a ‘target’ image. The target image will retain it’s ‘content’ or high-level macrostructure with the ‘style’ image’s ‘style’ overlaid.

In order to perform the style transfer, you only need to change the file path for the ‘style’ image and the ‘target’ image. Additionally, you may want to change the number of iterations based on computation power. In my example, I have the iteration number set at 2, as higher number of iterations did not increase the transfer quality to a noticeable degree.

My Example:

Target Image
Style Image
Output

--

--