npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jp.keijiro.rvm-coreml

v1.0.0

Published

Real-time Robust Video Matting for macOS using Core ML and Metal.

Readme

RVM Core ML Package for Unity

demo

This macOS-only Unity package runs Robust Video Matting (RVM) using Core ML and Metal.

Running the demo

Open the project with Unity 6000.6.1f1, then run Assets/Main.unity. The Editor and standalone player require Metal and macOS 13 or newer.

To use a video file as the source, place it in Assets/StreamingAssets. The demo scans this folder automatically and lists available videos in the source dropdown.

MatteGenerator

Add Rvm.CoreML.MatteGenerator to a GameObject to use the inference pipeline. ComputeUnits selects CpuOnly, CpuAndGpu, All, or CpuAndNeuralEngine; changes take effect the next time the component is enabled.

Assign a Texture to Input in the Inspector or from C# for continuous processing. The generator center-crops each available frame to the model's 1280 × 720 aspect ratio.

For one-shot input, call Process without changing Input:

if (generator.IsReady && generator.Process(sourceTexture))
    Debug.Log("Frame accepted");

Process returns false while the model is loading, inference or reset is in progress, or the input is invalid. It copies accepted input immediately and does not retain the supplied texture reference. After the one-shot frame completes, a configured continuous Input resumes automatically.

Output accepts an externally owned RenderTexture of any size. If it is omitted, the component creates and owns a 1280 × 720 alpha-capable output, available through the same property. An output format with an alpha channel receives normalized input RGB plus the matte in A. A format without alpha receives the matte in every available color channel. The component never destroys an externally supplied output.

Call Reset() when changing sources or looping a video to discard pending frames and clear recurrent state. InferenceTime reports the most recently completed Core ML inference in milliseconds; IsReady and LastError expose load and error state.

Model and attribution

The bundled model is rvm_mobilenetv3_1280x720_s0.375_int8.mlmodel from PeterL1n/RobustVideoMatting, release v1.0.0. It uses MobileNetV3, a fixed 1280 × 720 input, downsample ratio 0.375, and INT8-quantized weights. Its SHA-256 is:

68efe6e7a23d5337fb4f935f77e83b0ec3cc823803083953eb18f4cc0549d794

RVM is described in Robust High-Resolution Video Matting with Temporal Guidance (Lin et al., WACV 2022). See THIRD_PARTY_NOTICES.md for upstream licensing information.

Demo matte-triggered synchronization

The demo implements matte-triggered synchronization to keep video presentation from slowing down to the RVM inference rate. The demo snapshots each accepted source frame so that video can advance independently while each completed matte remains paired with the exact frame used for inference.

With Matte-Triggered Sync enabled (the default), the demo presents queued color frames at the source cadence while RVM runs asynchronously. Intermediate frames use the preceding matte, and presentation does not advance past the frame currently being processed. When disabled, the demo waits for inference before presenting each matched color and matte, so video advances at the matte generation rate and intermediate frames are dropped.