Arbitrary image stylization example

I made an arbitrary image stylization example with ofxTensorFlow2.
It uses this model: TensorFlow Hub
Arbitrary image stylization example


Hey @Jona, this is fantastic and thanks for posting it! I’ve been wanting to play around with style transfer in oF for a while now and a basic example like this is super helpful. I’ll bet that ofxTensorFlow2 has some examples too. So, do you have to download the model and put it into the project /bin/data/ folder? Xcode has a tool called CreateML that I’ve played around with a bit. It can generate a model from a set of jpg files. It would be fun to somehow incorporate models from CreateML into an oF project. I can’t remember if they need Swift or not though.

@TimChi thanks. You need to put the model into the /bin/data/magenta folder (in this case model.load("magenta")). There are also ofxTensorFlow2 examples, but those models are trained on certain styles.

I actually wonder, if it is possible to control the style amount and to combine different styles with this pretrained net…
Like it is desribed here: Combining numerous artistic styles in Tensorflow | by Vardan Agarwal | Towards Data Science

1 Like