natmlx / movenet-multipose-unity

Multiple-person pose detection in Unity Engine.

Home Page:https://demos.natml.ai/@natml/movenet-multipose

Repository from Github https://github.comnatmlx/movenet-multipose-unityRepository from Github https://github.comnatmlx/movenet-multipose-unity

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!

About

Multiple-person pose detection in Unity Engine.

https://demos.natml.ai/@natml/movenet-multipose

License:Apache License 2.0


Languages

Language:C# 100.0%