1.0.2 • Published 7 months ago

ai.natml.vision.blazepose v1.0.2

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

BlazePose

MediaPipe BlazePose for full-body pose detection in Unity Engine with NatML.

Installing BlazePose

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

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

Predicting Poses in an Image

First, create the BlazePose pipeline:

// Fetch the model data
var detectorModelData = await MLModelData.FromHub("@natml/blazepose-detector");
var predictorModelData = await MLModelData.FromHub("@natml/blazepose-landmark");
// Create the BlazePose pipeline
var pipeline = new BlazePosePipeline(detectorModelData, predictorModelData);

Then detect poses in the image:

// Create image feature
Texture2D image = ...;
// Detect poses in the image
BlazePosePredictor.Pose[] poses = pipeline.Predict(image);

Requirements

  • Unity 2022.3+

Quick Tips

Thank you very much!