1.0.8 • Published 9 months ago

ai.natml.vision.blazeface v1.0.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

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!