Skip to content

Latest commit

 

History

History
55 lines (47 loc) · 1.23 KB

File metadata and controls

55 lines (47 loc) · 1.23 KB

Meet

MediaPipe Meet Segmentation for human matting in Unity Engine.

Installing Meet

Add the following items to your Unity project's Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "NatML",
      "url": "https://registry.npmjs.com",
      "scopes": ["ai.natml", "ai.fxn"]
    }
  ],
  "dependencies": {
    "ai.natml.vision.meet": "1.0.7"
  }
}

Predicting the Matte

First, create the predictor:

// Create the Meet predictor
var predictor = await MeetPredictor.Create();

Then predict the human matte:

// Given an image...
Texture2D image = ...;
// Predict the human matte
MeetPredictor.Matte matte = predictor.Predict(image);

Finally, render the segmentation map to a RenderTexture:

// Create a destination `RenderTexture`
var result = new RenderTexture(image.width, image.height, 0);
// Visualize the map into a `RenderTexture`
matte.Render(result);

Requirements

  • Unity 2022.3+

Quick Tips

Thank you very much!