PostsAboutGames
All posts tagged with tensorflow

Style Transfer using Deep Learning

May 04, 2020 - Søren Alsbjerg Hørup

I recently experimented with deep learning algorithms using TensorFlow and Python. A cool use-case I found was to transfer the style of one image onto another image. This can be achieved using a “Neural style transfer” model, which extracts the style of image A, the “semantics” of image B and constructs a new image C with the style of image A and the semantics of image B.

For fun, I did a quick implementation using the Neural style transfer module found here, using Python and Tenserflow:

https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2

Without much tweaking, I got some fun “paintings” as seen below.

1

2

3

6

8

Next step is to port the model to Tensorflow.js and see if I can run the model in the browser and generate similar results!