All Projects → getnamo → Tensorflow Ue4 Examples

getnamo / Tensorflow Ue4 Examples

Licence: mit
Drag and drop Unreal Engine TensorFlow examples repository

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tensorflow Ue4 Examples

Wordpress Plugin Boilerplate Tutorial
Tutorials and Examples for WordPress Plugin Boilerplate, a foundation for WordPress Plugin Development.
Stars: ✭ 232 (+31.82%)
Mutual labels:  examples, plugin
Socketio Client Ue4
socket.io client plugin for Unreal Engine 4
Stars: ✭ 451 (+156.25%)
Mutual labels:  unrealengine, plugin
Unreal.js Core
Unreal.js plugin submodule
Stars: ✭ 189 (+7.39%)
Mutual labels:  unrealengine, plugin
Steambridge
A UE4 implementation of the Steamworks API.
Stars: ✭ 48 (-72.73%)
Mutual labels:  unrealengine, plugin
Unreal.js
Unreal.js: Javascript runtime built for UnrealEngine 4
Stars: ✭ 3,087 (+1653.98%)
Mutual labels:  unrealengine, plugin
Bitsofbytes
Code and projects from my blog posts.
Stars: ✭ 89 (-49.43%)
Mutual labels:  examples, plugin
Mirage Skeleton
Examples of simple MirageOS apps
Stars: ✭ 168 (-4.55%)
Mutual labels:  examples
Vue I18next
Internationalization for vue using the i18next i18n ecosystem.
Stars: ✭ 172 (-2.27%)
Mutual labels:  plugin
Vim Subversive
Vim plugin providing operator motions to quickly replace text
Stars: ✭ 168 (-4.55%)
Mutual labels:  plugin
Source Integration
Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more
Stars: ✭ 167 (-5.11%)
Mutual labels:  plugin
Wiwinwlh
What I Wish I Knew When Learning Haskell
Stars: ✭ 2,250 (+1178.41%)
Mutual labels:  examples
Posse gallery
Posse's fancy new gallery for Flutter.
Stars: ✭ 174 (-1.14%)
Mutual labels:  examples
Dlfcn Win32
Official dlfcn-win32 repo
Stars: ✭ 170 (-3.41%)
Mutual labels:  plugin
Ue4 Style Guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,656 (+1409.09%)
Mutual labels:  unrealengine
04 battletank
An open-world head-to-head tank fight with simple AI, terrain, and advanced control system in Unreal 4. (ref: BT_URC) http://gdev.tv/urcgithub
Stars: ✭ 172 (-2.27%)
Mutual labels:  unrealengine
Cordova Plugin Document Viewer
A Document Viewer cordova/phonegap plugin for iOS, Android and Windows
Stars: ✭ 168 (-4.55%)
Mutual labels:  plugin
Hyper Tabs Enhanced
Enhanced Tabs Plugin for Hyper
Stars: ✭ 173 (-1.7%)
Mutual labels:  plugin
Tailwindcss Figma Plugin
Figma Plugin for TailwindCSS
Stars: ✭ 165 (-6.25%)
Mutual labels:  plugin
Sketch2ae
A Sketch plugin to export sketch file to Adobe After Effect
Stars: ✭ 170 (-3.41%)
Mutual labels:  plugin
Icondrop
Get access to 2 million+ design resources right inside Adobe Xd, Figma, Sketch, Microsoft Office, G Suite and many more.
Stars: ✭ 174 (-1.14%)
Mutual labels:  plugin

tensorflow-ue4-examples

GitHub release Github All Releases

Example content project for tensorflow-ue4 plugin.

This repository also tracks changes required across all dependencies to make tensorflow work well with UE4.

See issues for current work and bug reports.

Unreal Forum Thread

Setup

  1. (GPU only) Install CUDA and cudNN pre-requisites if you're using compatible GPUs (NVIDIA)
  2. Download latest project release
  3. Download the matching tensorflow plugin release. Choose CPU download (or GPU version if hardware is supported). The matching plugin link is usually found under the project release.
  4. Browse to your extracted project folder
  5. Copy Plugins folder from your plugin download into your Project root.
  6. Launch and wait for tensorflow dependencies to be installed. The tensorflow plugin will auto-resolve any dependencies listed in Plugins/tensorflow-ue4/Content/Scripts/upymodule.json using pip. Note that this step may take a few minutes and depends on your internet connection speed and you will see nothing change in the output log window until the process has completed.

image

  1. Once you see an output similar to the above in your console window, everything should be ready to go, try different examples from e.g. Content/ExampleAssets/Maps!

Note on cloning the repository

If you're not using a release, but instead wish to clone the repository using git. Ensure you follow TensorFlow-ue4 instructions on cloning.

Examples

Mnist recognition

Map is found under Content/ExampleAssets/Maps/Mnist.umap and it should be the default map when the project launches.

mnist spawn samples

Default mnist example script: mnistSpawnSamples.py

On map launch you'll have a basic example ready for play in editor. It should automatically train a really basic network when you hit play and then be ready to use in a few seconds. You can then press 'F' to send e.g. image of a 2 to predict. Press 0-9 numbers on your keyboard to change the input, press F again to send this updated input to classifier. Note that this is a very basic classifier and it will struggle to classify digits above 4 in the current setup.

Classifying custom data

You can change the input to any UTexture2D you can access in your editor or game, but if the example is using a ConnectedTFMnistActor you can also use your mouse/fingers to draw shapes to classify. Simply go to http://qnova.io/e/mnist on your phone or browser after your training is complete, then draw shapes in your browser and it will send those drawn shapes to your UE4 editor for classification.

custom classification

Note that only the latest connected UE4 editor will receive these drawings, if it's not working just restart your play in editor to become the latest editor that connected. You can also host your own server with the node.js server module found under: https://github.com/getnamo/tensorflow-ue4-examples/tree/master/ServerExamples. If you want to connect to your own server, change the ConnectedTFMnistActor->SocketIOClient->Address and Port variable to e.g. localhost:3000.

Other classifiers e.g. CNN Keras model

If you want to try other mnist classifiers models, change your ConnectedTFMnistActor->Python TFModule variable to that python script class. E.g. if you want to try the Keras Convolutional Neural Network Classifier change the module name to mnistKerasCNN and hit play. Note that this classifier may take around 18 min to train on a CPU, or around 45 seconds on a GPU. It should however be much more accurate than the basic softmax classifier used by default.

See available classifier models provided here: https://github.com/getnamo/tensorflow-ue4-examples/tree/master/Content/Scripts

Saving / Loading Models

mnistSaveLoad python script will train on the first run and then save the trained model. Each subsequent run will then use that trained model, skipping training. You can also copy and paste this saved model to a new project and then when used in a compatible script, it will also skip the training. Use this as a guide to link your own pre-trained network for your own use cases.

You can force retraining by either changing ConnectedTFMnistActor->ForceRetrain to true or deleting the model found under Content/Scripts/model/mnistSimple

Basic Tensorflow Example - Addition & Subtraction of Float Arrays

Map is found under Content/ExampleAssets/Maps/Basic.umap

basic example

Uses TFAddExampleActor to encapsulate addExample.py. This is a bare bones basic example to use tensorflow to add or subtract float array data. Press 'F' to send current custom struct data, press 'G' to change operation via custom function call. Change your default ExampleStruct a and b arrays to change the input sent to the tensorflow python script.

Other Examples

If you have other examples you want to implement, consider contributing or post an issue with a suggestion.

Tensorflow API

See https://github.com/getnamo/tensorflow-ue4 for latest documentation.

Dependencies

depends on:

https://github.com/getnamo/tensorflow-ue4

https://github.com/getnamo/UnrealEnginePython

https://github.com/getnamo/socketio-client-ue4

Troubleshooting

Startup Error

If you're seeing something like

no plugins error

You did not follow step 3. in setup. Each release has a matching plugin that you need to download and drag into the project folder.

Video

There's a video made by github user Berranzan that walks through setting up the tensorflow examples for 4.18 with GPU support.

Neural networks on UE4

For issues not covered in the readme see:

https://github.com/getnamo/tensorflow-ue4-examples/issues

and

https://github.com/getnamo/tensorflow-ue4/issues

Presentation

Example project used in the presentation https://drive.google.com/open?id=1GiHmYJeZI6BKUKYfel6xc0YFhMbjSOoCY17nl98dihA contained in https://github.com/getnamo/tensorflow-ue4-examples/tree/presentation branch

Second presentation with 0.4 api: https://docs.google.com/presentation/d/1p5p6CjYYYfbflFpvr104U1GwrfArfl4Hkcb6N3SIBH8

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].