Skip to content

Latest commit

 

History

History
73 lines (60 loc) · 1.97 KB

README.md

File metadata and controls

73 lines (60 loc) · 1.97 KB

MoveNet Multipose

MoveNet multiple body pose detection from Google MediaPipe.

demo

Installing Function

To use this sample in a custom project, first install Function by adding the following items to your Unity project's Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "Function",
      "url": "https://registry.npmjs.com",
      "scopes": ["ai.fxn"]
    }
  ],
  "dependencies": {
    "ai.fxn.fxn3d": "0.0.12"
  }
}

Predicting Poses in an Image

First, retrieve your access key from Function and add it in Player Settings:

project settings

Important

After some time, you will need to add billing info to make predictions with Function.

Next, create a Function client:

using Function;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

// Create a Function client
var fxn = FunctionUnity.Create();

Then predict the poses in an image:

// Predict poses
var prediction = await fxn.Predictions.Create(
    tag: "@natml/movenet-multipose",
    inputs: new () { ["image"] = image.ToImage() }
);
var poses = prediction.results[0] as JArray;

Note

Check out the schema of the returned poses.

Requirements

  • Unity 2021.2+

Supported Platforms

  • Android API level 24+
  • iOS 14+
  • macOS 10.15+ (Apple Silicon and Intel)
  • Windows 10+ (64-bit only)
  • WebGL:
    • Chrome 91+
    • Firefox 90+
    • Safari 16.4+

Resources

Thank you very much!