Socket
Socket
Sign inDemoInstall

ai.natml.vision.robust-video-matting

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai.natml.vision.robust-video-matting

Robust Video Matting for high-fidelity human segmentation in Unity Engine.


Version published
Maintainers
1
Weekly downloads
97
decreased by-53.14%

Weekly downloads

Readme

Source

Robust Video Matting

Robust Video Matting for human segmentation.

Installing Robust Video Matting

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

{
  "scopedRegistries": [
    {
      "name": "NatML",
      "url": "https://registry.npmjs.com",
      "scopes": ["ai.natml"]
    }
  ],
  "dependencies": {
    "ai.natml.vision.robust-video-matting": "1.0.4"
  }
}

Predicting the Matte

First, create the Robust Video Matting predictor:

// Create the RVM predictor
var predictor = await RobustVideoMattingPredictor.Create();

Predict the matte for an image:

// Compute the matte
Texture2D image = ...; // This can also be a WebCamTexture or an MLImageFeature
RobustVideoMattingPredictor.Matte matte = predictor.Predict(image);

Finally, render the predicted matte to a RenderTexture:

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

Requirements

  • Unity 2021.2+

Quick Tips

Thank you very much!

Keywords

FAQs

Last updated on 10 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc