NatML
Search…
NatML for Unity
High Performance Cross-Platform Machine Learning

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:
1
// Fetch the MobileNet classifier model data
2
var modelData = await MLModelData.FromHub("@natsuite/mobilenet-v2");
3
// Create the model
4
var model = modelData.Deserialize();
Copied!
Then create a predictor to make predictions with your model:
1
// Create a predictor
2
var labels = new [] { "cat", "dog", ... };
3
var predictor = new MobileNetv2Predictor(model, labels);
Copied!
Finally, make predictions with the predictor:
1
// Say we have an image
2
Texture2D image = ...;
3
// We use our model to classify it
4
var (label, confidence) = predictor.Predict(image);
5
// Log classification to console
6
Debug.Log(quot;Model predicted {label} with confidence {confidence}");
Copied!

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

GitHub - natsuite/NatML: High performance, cross-platform machine learning runtime for Unity Engine. Register at https://hub.natml.ai
GitHub
NatML on GitHub
Last modified 1mo ago