Barracuda Style Transfer code sample.
Style transfer applyed to Book of the Dead Environment via
Unity Barracuda.
This repo is the companion code for the Style Transfer blog post and presents how to setup the style transfer in a sample scene.
Instructions:
- Open BarracudaStyleTransfer/SampleScene/SampleScene.unity with Unity 2019.4.1f1 LTS (2020.x should also work)
- Run the scene. It can take some time to start due to the loading of the network.
- The style transfer script is found on the Style Transfer Camera object
Important:
- Only GPU workers are supported.
- Only desktop are supported.
- Use Barracuda 3.0.0.
Controls:
- Left click to enable/disable style transfer.
- Right click to cycle through the styles.
- Mouse wheel up/down to increase/decrease the amount of framerate upsampling (see notes below)
Style transfer script settings:
Known bugs/limitations:
- The network was trained using sRGB data, the code in this repo explicitely handles conversion from texture to sRGB tensor. Support will be added to Barracuda in a later version.