ai.natml.vision.blazeface

1.0.8 • Public • Published

BlazeFace

MediaPipe BlazeFace for realtime face detection in Unity Engine with NatML.

Installing BlazeFace

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.blazeface": "1.0.7"
  }
}

Detecting Faces in an Image

First, create the BlazeFace predictor:

// Create the BlazeFace predictor
var predictor = await BlazeFacePredictor.Create();

Then detect faces in the image:

// Create image feature
Texture2D image = ...;
// Detect faces
Rect[] faces = predictor.Predict(image);

Requirements

  • Unity 2021.2+

Quick Tips

Thank you very much!

Package Sidebar

Install

npm i ai.natml.vision.blazeface

Weekly Downloads

231

Version

1.0.8

License

Apache-2.0

Unpacked Size

25.7 kB

Total Files

15

Last publish

Collaborators

  • olokobayusuf