Mediapipe Rework

Me and my little friend reworked the mediapipe nuget because i wasnt very happy about how it worked. Now it runs Google’s MediaPipe models directly inside vvvv instead of in a hidden browser, so it accepts any texture as input (camera, video, renderer output). The only downside is that you need the big onnx files.

Try it out and tell me if it works then i can do a nuget:
https://files.bildwerk.tv/VL.MediaPipe.Native.zip

Nice work! Curious: how is it working technically, how were you to make MediaPipe free of browser dependency?

MediaPipe has two parts: the neural networks and the code around them. The old package only needed a browser to run Google’s web version of that.

  1. Models: Google’s .task files are zip archives of TensorFlow Lite models. They were converted to ONNX, which ONNX Runtime runs directly inside vvvv, via DirectML on any DX12 GPU.

  2. Logic: What MediaPipe does around the models was ported from Google’s open-source code to C#. That covers detection, crop computation, tracking, smoothing, gesture preprocessing and head pose.

  3. Texture: The node downscales the image on the GPU, reads it back without stalling, and runs the models on a background thread. A copy of each frame is kept so results stay in sync with the image.

  4. Verification: Every feature was compared against Google’s own MediaPipe on test images. That’s how details like edge-pixel handling and flipped handedness were caught.

In short: same models, same math, no browser in between.

The link no longer works :frowning:

its up again!