ai.natml.vision.meet
v1.0.7
Published
MediaPipe Meet Segmentation for human matting in Unity Engine.
Downloads
637
Maintainers
Readme
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
- Join the NatML community on Discord.
- Discover more ML models on NatML Hub.
- See the NatML documentation.
- Contact us at [email protected].
Thank you very much!