Socket
Socket
Sign inDemoInstall

api.natsuite.natml

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    api.natsuite.natml

High performance, cross platform machine learning runtime for Unity Engine.


Version published
Weekly downloads
5
increased by25%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

NatML

NatML

NatML allows developers to integrate machine learning into their Unity applications in under five lines of code with zero infrastructure. NatML completely removes the need to have any experience with machine learning in order to take advantage of the features it can provide. Features include:

  • Universal Machine Learning. With NatML, you can drop TensorFlow Lite (.tflite), CoreML (.mlmodel), and ONNX (.onnx) models directly into your Unity project and run them.

  • Bare Metal Performance. NatML takes advantage of hardware machine learning accelerators, like CoreML on iOS and macOS, NNAPI on Android, and DirectML on Windows. As a result, it is multiple times faster than Unity's own Barracuda engine.

  • Cross Platform. NatML supports Android, iOS, macOS, and Windows alike. As a result, you can build your app once, test it in the Editor, and deploy it to the device all in one seamless workflow.

  • Extremely Easy to Use. NatML exposes machine learning models with simple classes that return familiar data types. These are called "Predictors", and they handle all of the heavy lifting for you. No need to write pre-processing scripts or shaders, wrangle tensors, or anything of that sort.

  • Growing Catalog. NatML is designed with a singular focus on applications. As such, we maintain a growing catalog of predictors that developers can quickly discover and deploy in their applications. Check out NatML Hub.

  • 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. As a result, you can simply import the package and get going--no setup necessary.

Installing NatML

Add the following items to your Unity project's Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "NatML",
      "url": "https://registry.npmjs.com",
      "scopes": ["api.natsuite"]
    }
  ],
  "dependencies": {
    "api.natsuite.natml": "1.0.10"
  }
}

Discover ML Models on NatML Hub

Create an account on NatML Hub to find and download ML predictors to use in your project!

NatML Hub

You can also upload your models to Hub and make them private or public. Check out the online documentation for information on authoring predictors.

Using ML Models in Three Simple Steps

You will always use NatML in three steps. First, create a model from model data. Model data can either be fetched from NatML Hub or created from raw ML model files in your project (.mlmodel, .tflite, and .onnx):

// Fetch model data from NatML
var accessKey = "<HUB ACCESS KEY>"; // Get your access key from https://hub.natml.ai/profile
var modelData = await MLModelData.FromHub("@author/some-model", accessKey);
// Deserialize the model
var model = modelData.Deserialize();

Then create a predictor to make predictions with the model:

// Create a predictor for the model
var predictor = new SomePredictor(model);

Finally, make predictions with the predictor:

// Make prediction on an image
Texture2D input = ...;
var someOutput = predictor.Predict(input);

Different predictors accept and produce different data types, but the usage pattern will always be the same.


Requirements

  • Unity 2020.3+

Supported Platforms

  • Android API Level 24+
  • iOS 13+
  • macOS 10.15+ (Apple Silicon and Intel)
  • Windows 10+, 64-bit only

Resources

Thank you very much!

Keywords

FAQs

Last updated on 14 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc