Binder and Google Colab are a free services where the webcam will not work, and performance on the video will not be good. For the best performance run the notebook locally.
Artistic style transfer blends a single style to any given image. The real-time style transfer model is a neural network trained to apply a single style to images. Different networks can be trained for different styles you may wish to apply.
There are five pre-trained style transfer models you can use with this notebook with the following styles: Mosaic, Rain Princess, Candy, Udnie and Pointilism. The models are downloaded from ONNX Model Repository. They are based on the research paper Perceptual Losses for Real-Time Style Transfer and Super-Resolution and Instance Normalization. The final steps in this notebook show live inference results using video from a webcam and video file.
This is a self-contained example that relies solely on its own code.
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start.
For details, please refer to Installation Guide.