High Performance Cross-Platform Machine Learning Runtime for Unity Engine

Machine Learning Made Easy

NatML is a cross-platform machine learning runtime for Unity Engine. It allows you to run ML models in your app, opening up possibilities in your user experience. In a few simple steps:

First fetch a model:

// Fetch the MobileNet classifier model data
var modelData = await MLModelData.FromHub("@natsuite/mobilenet-v2");
// Create the model
var model = modelData.Deserialize();

Then create a predictor to make predictions with your model:

// Create a predictor
var labels = new [] { "cat", "dog", ... };
var predictor = new MobileNetv2Predictor(model, labels);

Finally, make predictions with the predictor:

// Say we have an image
Texture2D image = ...;
// We use our model to classify it
var (label, confidence) = predictor.Predict(image);
// Log classification to console
Debug.Log($"Model predicted {label} with confidence {confidence}");

Bare Metal Performance

NatML is designed specifically around high-performance interactive applications. Features include:

  • Bare Metal Performance. NatML supports CoreML on iOS and macOS, NNAPI on Android, and DirectML on Windows, giving you the highest performance across platforms.

  • Extremely Easy to Use. NatML exposes machine learning models with simple functions that return familiar data types.

  • Full Support for ONNX. NatML supports the full ONNX specification.

  • Cross Platform. NatML supports Android, iOS, macOS, and Windows alike.

  • Growing Ecosystem. There is a growing ecosystem of ML application packages built on NatML. You can also publish your own NatML packages.

  • Computer Vision. NatML supports models for object classification, object detection, semantic segmentation, style transfer, and so much more.

  • Augmented Reality. NatML is particularly suited for augmented reality because it delegates work to ML accelerators, freeing up the GPU to render your app smoothly.

  • Lightweight Package. NatML is distributed in a self-contained package, with no external dependencies and no setup necessary.

Get NatML