This is an example of using model trained with Tensorflow in Unity application for image classification. It's a quick port of TF Classify example from Tensorflow repo, using TensorflowSharp for gluing it all together.
You'll need Unity 2017.1 or above and Unity Tensorflow Plugin.
- Open the project in Unity.
- Install Tensorflow plugin.
- Open Scene1 in Assets folder.
- In
Edit -> Player Settings -> Other settings
addENABLE_TENSORFLOW
to theScripting Define Symbols
for the target platform. - In
Other settings
also setScripting runtime version
toExperimental (.NET 4.6 Equivalent)
. - Build and run.
More info can be found here.
I'm neither Unity nor Tensorflow expert, so if you found any problems with this example feel free to open an issue.