ai.natml.vision.blazepose

1.0.2 • Public • Published

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!

Package Sidebar

Install

npm i ai.natml.vision.blazepose

Weekly Downloads

295

Version

1.0.2

License

Apache-2.0

Unpacked Size

39.4 kB

Total Files

21

Last publish

Collaborators

  • olokobayusuf