Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ai.natml.vision.nanodet

natmlx81Apache-2.01.0.2

Anchor-free ultra-fast object detection.

natml, machine learning, ml, aritificial intelligence, mediapipe, matte, background, background removal, augmented reality

readme

NanoDet

NanoDet high performance general object detection.

Installing NanoDet

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

{
  "scopedRegistries": [
    {
      "name": "NatML",
      "url": "https://registry.npmjs.com",
      "scopes": ["ai.natml"]
    }
  ],
  "dependencies": {
    "ai.natml.vision.nanodet": "1.0.2"
  }
}

Detecting Objects in an Image

First, create the NanoDet predictor:

// Create the NanoDet predictor
var predictor = await NanoDetPredictor.Create();

Then detect objects in the image:

// Create image feature
Texture2D image = ...;
// Detect objects
NanoDetPredictor.Detection[] detections = predictor.Predict(image);

Requirements

  • Unity 2022.3+

Quick Tips

Thank you very much!

changelog

1.0.2

  • Upgraded to NatML 1.1.15.

1.0.1

  • Added NanoDetPredictor.Create static method for creating the predictor.
  • Added NanoDetPredictor.Tag constant string for model embedding.
  • Removed NanoDetPredictor public constructor. Use the Create static method instead.
  • Upgraded to NatML 1.1.4.

1.0.0

  • First release.