The need

Image manipulation used to be time-intensive and required hours of manual editing. Now most people can change images instantly with apps that apply filters. You can create your own filtering and styles using AI to train learning models.

The idea

The process of performing a style transfer takes any input image, then passes it through a function in your code—to apply a new style based on a deep learning model. The result is a completely transformed image.

The solution

We used Visual Studio Tools for AI to train the deep learning models for our app. We trained the AI to recognize 80,000 common images. Then it applies a given style, altering the image while preserving the content.

Technical details for Style Transfer

To create this application, we used Visual Studio Tools for AI to train the deep learning models and include them in our app. Visual Studio Tools for AI improved our productivity by easily enabling stepping through our Keras+Tensorflow model training code on our local dev machine, then submitting to Azure VMs with powerful Nvidia GPUs.

By starting with a pre-trained model like VGG-19, we were able to speed up the model training and still maintain semantic similarities to the original input image by preserving objects like people, buildings, cars and more.

Additionally, Visual Studio Tools for AI also generated C# code from our trained TensorFlow models to include them in our application without having to write the code. Using the new Microsoft.ML.Scoring library, it’s easy to include TensorFlow or ONNX models in applications that run on your devices or in the cloud.

Style transfer applications are just one type of application that uses trained machine learning models, but the process to infuse these new machine learning experiences powered by AI is always the same.

You can train models yourself using frameworks like Tensorflow or CNTK, or you can use pre-trained AI capabilities like Azure Cognitive Services. Get started with the Microsoft AI platform and become an AI developer today.


Projects related to Style Transfer

Browse more innovation sandbox projects

Explore the possibilities of AI

Jumpstart your own AI innovations with learning resources and development solutions from Microsoft AI.