← all repositories
getnamo/TensorFlow-Unreal

TensorFlow inside Unreal: Python scripts as Actor Components

A plugin that lets you train and run TensorFlow models from Blueprint by embedding a Python interpreter and wrapping it in an Actor Component.

TensorFlow-Unreal
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does

This Unreal Engine plugin bundles TensorFlow, an embedded Python runtime, and Socket.IO into a drop-in Actor Component. You write Python scripts that subclass TFPluginAPI, drop them in your project’s Content/Scripts folder, and control training or inference from Blueprint. The plugin auto-installs Python dependencies via pip on first launch, so you don’t have to manage virtualenvs by hand.

The interesting bit

The architecture is a bit of a Rube Goldberg machine: C++ and Blueprint talk to Python, which talks to TensorFlow, and results shuttle back as JSON. It shouldn’t work this smoothly, yet it does — complete with async training callbacks that stream sample images into the editor while MNIST trains. The author even had to handle Keras session/graph threading headaches so you don’t have to.

Key highlights

  • Windows-only binary releases with CPU and GPU variants; CUDA setup still required for GPU
  • Auto-resolves Python dependencies via pip from upymodule.json on first launch
  • Supports both training from scratch and loading saved models for inference
  • Async events let Python stream data back to Blueprint mid-training
  • Includes MNIST examples with UTexture2D input for image prediction

Caveats

  • Windows only; Linux, macOS, and Android are tracked as open issues with no timeline
  • 240-character filepath limit can break Python dependency installation
  • The README notes this approach will likely be superseded by two work-in-progress replacements: MachineLearningRemote-Unreal and TensorFlowNative-Unreal

Verdict

Worth a look if you need TensorFlow in a Windows Unreal project today and can tolerate a Python-in-the-middle architecture. Skip it if you’re on macOS/Linux or want something the maintainer isn’t already planning to replace.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.