All Projects → Syn-McJ → Tfclassify Unity

Syn-McJ / Tfclassify Unity

Licence: mit
An example of using Tensorflow with Unity for image classification and object detection.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Tfclassify Unity

Rcam
Real time volumetric video capture for live visuals
Stars: ✭ 128 (-8.57%)
Mutual labels:  unity, unity3d
Kinostreak
Anamorphic lens flare effect for Unity
Stars: ✭ 139 (-0.71%)
Mutual labels:  unity, unity3d
Unity Linesegmentsintersection
Line segments intersection for Unity.
Stars: ✭ 128 (-8.57%)
Mutual labels:  unity, unity3d
Arkit Unity3d
Access ARKit features like world-tracking, live video rendering, plane estimation and updates, hit-testing API, ambient light estimation, and raw point cloud data.
Stars: ✭ 124 (-11.43%)
Mutual labels:  unity, unity3d
Ml Agents
Unity Machine Learning Agents Toolkit
Stars: ✭ 12,134 (+8567.14%)
Mutual labels:  unity, unity3d
Lwrpshaders
A collection of high customizable unlit shaders for Lightweight Render Pipeline
Stars: ✭ 125 (-10.71%)
Mutual labels:  unity, unity3d
Unium
Automation for Unity games
Stars: ✭ 132 (-5.71%)
Mutual labels:  unity, unity3d
Infinity Square Space
Infinity Square/Space. The prototype of the game is open source. Unity Asset.
Stars: ✭ 122 (-12.86%)
Mutual labels:  unity, unity3d
Unity Webxr Export
Develop and export WebXR experiences using Unity WebGL
Stars: ✭ 130 (-7.14%)
Mutual labels:  unity, unity3d
Mxnet.sharp
.NET Standard bindings for Apache MxNet with Imperative, Symbolic and Gluon Interface for developing, training and deploying Machine Learning models in C#. https://mxnet.tech-quantum.com/
Stars: ✭ 134 (-4.29%)
Mutual labels:  object-detection, image-classification
Uween
Lightweight tween library for Unity.
Stars: ✭ 123 (-12.14%)
Mutual labels:  unity, unity3d
Unitylauncher
Unity Version Launcher
Stars: ✭ 137 (-2.14%)
Mutual labels:  unity, unity3d
Minimalcompute
Stars: ✭ 122 (-12.86%)
Mutual labels:  unity, unity3d
Gitdependencyresolverforunity
This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!
Stars: ✭ 126 (-10%)
Mutual labels:  unity, unity3d
Towerdefense
A Tower Defense style game example in Unity
Stars: ✭ 122 (-12.86%)
Mutual labels:  unity, unity3d
Customsrp
Many mini-custom-SRPs showing how to achieve different things when creating your own SRP. Only SRP Core package is needed.
Stars: ✭ 132 (-5.71%)
Mutual labels:  unity, unity3d
Pcxeffects3
Unity VFX with point cloud
Stars: ✭ 121 (-13.57%)
Mutual labels:  unity, unity3d
Vfxminisexamples
Unity examples showing how to control VFX graphs with MIDI devices
Stars: ✭ 122 (-12.86%)
Mutual labels:  unity, unity3d
Textureupdateexample
An example showing how to update textures from a native plugin in Unity.
Stars: ✭ 133 (-5%)
Mutual labels:  unity, unity3d
Eazy Sound Manager
Eazy Sound Manager is a simple Unity3D tool which aims to make sound and music management in games easier
Stars: ✭ 135 (-3.57%)
Mutual labels:  unity, unity3d

Note: TensorFlowSharp plugin has been deprecated, instead Unity uses its new Barracuda inference engine. See the new example. It's better in terms of performance and ease of use for certain models.

What

This is an example of using model trained with TensorFlow in Unity application for image classification and object detection. It's a quick port of TF Classify and TF Detect examples from TensorFlow repo, using TensorFlowSharp for gluing it all together.

Classify results:

Detect results:

Note that performance is worse than in TensorFlow Android example and at this moment I'm not quite sure how to improve that. Hopefully this will be enough to get you started.

How

You'll need Unity 2019.2 or above and Unity TensorFlow Plugin.

  • Open the project in Unity.
  • Install TensorFlow plugin.
  • Open Classify or Detect scene in Assets folder.
  • In Edit -> Player Settings -> Other settings add ENABLE_TENSORFLOW to the Scripting Define Symbols for the target platform.
  • In Other settings also set Scripting runtime version to .NET 4.6 Equivalent.
  • Build and run.

Important: in new versions of Unity you might see error "Multiple assemblies with equivalent identity have been imported...". In that case, you'll need to go into 'Assets/ML-Agents/Plugins/Android' folder and manually delete all .dll files that are specified in the error message.

"Unloading broken assembly..." error can be safely ignored.

For iOS, folow this additional instructions: ios-additional-instructions-for-building

More info can be found here.

To use your own model:

  • Make sure your model trained with TensorFlow 1.4 if you use 0.3 version of the Unity plugin that I linked above. You can also try 0.4 version that uses TensorFlow 1.7.1.
  • Change extension of your model from .pb to .bytes.
  • Put your model and labels in Resources.
  • Set Model file and Labels file to your model and labels in main camera object of the scene you chose.
  • If neccesary, change classifyImageSize, IMAGE_MEAN, IMAGE_STD, INPUT_NAME and OUTPUT_NAME to suit your model.

Notes

I'm not a Unity expert, so if you found any problems with this example feel free to open an issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].