Skip to content

natmlx/movenet-multipose-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoveNet Multipose

MoveNet multiple body pose detection from Google MediaPipe.

demo

Predicting Poses in an Image

Install Function in your Unity project then 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 poseObjects = prediction.results[0] as JArray;

Finally, parse the detected poses with the Pose struct:

// Parse the detected poses
Pose[] poses = poseObjects.ToObject<Pose[]>(Pose.Serializer);

Note

Check out the schema of the returned poses.

Requirements

  • Unity 2022.3+

Supported Platforms

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

Resources

Thank you very much!