Style transfer models offer near limitless opportunities for customization. To help you choose the right set of hyperparameters to achieve the best results, we've created this guide with examples from ready-to-use styles and heuristics developed from our own experiments.
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
Make sure any images you use have an appropriate license.
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.