Skip to content

natmlx/movenet-multipose-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!