Style Transfer

Style transfer models offer near limitless opportunities for customization. They are special in that they only require one style image to train and have a few different hyperparameters that can be tuned to change the resulting filter. To help you achieve the best results, we've created this guide with examples from ready-to-use styles and heuristics developed from our own experiments.

1. Create a new Style Transfer project

First, create a new project and select the Style Transfer project type.

Create a style transfer project

2. Train your style transfer model

After creating your project, select the Training tab in the menu and click TRAIN A NEW MODEL.

Choosing a Style Image

Not all style images are equal. For the best results, pick images that:

  • Have large geometric patterns on the scale of 10% - 33% of the image's width
  • Have bold, contrasting color palletes
  • Have strong edges

If you're looking for inspiration, consider searching Unsplash or Flickr for terms like "abstract" or "geometric".

Make sure any images you use have an appropriate license.

Adjustable parameters

Changing the relative magnitude of each loss weight is the best way to change the aesthetic of your model.

There are four loss terms:

  • style weight: The higher this weight, the more the output images will resemble the style of your style image.
  • content weight: The higher this weight, the more your stylized image will retain the content of the original.
  • total variation weight: The higher this value, the smoother your stylized images will be. This may wash out small textures.
  • stability weight: The higher this value, the more the model will attempt to stabilize videos. This can have the effect of washing out smaller textures.

Below are example configurations for a number of sample style images.

NameStyle ImageOutputContent WeightStyle WeightTotal Variation WeightStability Weight
bicentennial_print1555
blue_arrow1155
comic1555
femmes11055
filament1455
green_blocks11055
head_of_clown11055
horses_on_seashore11055
kaleidoscope1555
lamp_post1455
mosaic31055
notre_dame1455
pink_blue_rhombus1555
poppy_field31055
ritmo_plastico11055
shades1155
sketch1455
snowflake51055
sprinkles2155
starry_night11055
swirl51055
the_scream12055
the_trial11055
tile1555
vector2155

3. Export your Lens Studio project

Once your model is trained, you can export it as part of a pre-built Lens Studio project directly from the Models table in Fritz AI Studio.

Lens Studio Project Export

4. Configure your model in Lens Studio

Once downloaded, unzip the project archive and open the .lsproj file in Snap Lens Studio. Follow the instructions in the README.js file to configure your project.