MediaPipeSharp 1.0.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.8
This package targets .NET Framework 4.8. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MediaPipeSharp --version 1.0.0
NuGet\Install-Package MediaPipeSharp -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MediaPipeSharp" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MediaPipeSharp" Version="1.0.0" />
<PackageReference Include="MediaPipeSharp" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MediaPipeSharp --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MediaPipeSharp, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MediaPipeSharp@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MediaPipeSharp&version=1.0.0
#tool nuget:?package=MediaPipeSharp&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MediaPipeSharp
MediaPipe inference library for .NET based on OpenVINO C# API (guojin-yan / JYPPX) and OpenCvSharp4.
Provides ready-to-use wrappers for the MediaPipe models from opencv_zoo:
| Module | Class | Input | Output |
|---|---|---|---|
| Palm Detection | PalmDetector |
Image | Bounding box + 7 palm landmarks |
| Hand Pose | HandPoseEstimator |
Image + PalmDetectionResult | 21 landmarks (screen + world) + handedness |
| Person Detection | PersonDetector |
Image | Bounding box + 4 body keypoints |
| Pose Estimation | PoseEstimator |
Image + PersonDetectionResult | 39 landmarks (screen + world) + segmentation mask |
Supported frameworks
net48, net6.0, net8.0, net9.0, net10.0
.NET Framework 4.8 notes
- The native libraries ship for win-x64 only. Set
<PlatformTarget>x64</PlatformTarget>(do not enablePrefer32Bit), otherwise the process starts as 32-bit andDllNotFoundExceptionis thrown. - With
PackageReferenceno manual setup is needed:OpenCvSharpExtern.dll,opencv_videoio_ffmpeg*.dll,openvino*.dllandtbb*.dllare copied to the output directory automatically. - Old-style
packages.configprojects do not resolveruntimes/native assets, so those DLLs must be copied to the output directory manually.PackageReferenceis recommended.
Dependencies
JYPPX.OpenVINO.CSharp.API(>= 3.3.1) — OpenVINO C# wrapper by guojin-yanOpenVINO.runtime.win— native OpenVINO runtimeOpenCvSharp4(4.13.x) +OpenCvSharp4.runtime.win
Installation
dotnet add package MediaPipeSharp
Model download
The models are not bundled in the NuGet package. Download them from opencv_zoo or use the OpenVINO model downloader:
palm_detection_mediapipe.onnx
handpose_estimation_mediapipe.onnx
person_detection_mediapipe.onnx
pose_estimation_mediapipe.onnx
Quick start
using OpenCvSharp;
using MediaPipeSharp.Palm;
using MediaPipeSharp.Hand;
// --- Palm detection ---
using var palm = new PalmDetector("palm_detection_mediapipe.onnx", "CPU");
using var image = Cv2.ImRead("hand.jpg");
palm.InferImage(image);
foreach (var r in palm.Results)
{
Console.WriteLine($"Palm score={r.Score:F3} box={r.BoundingBox}");
}
// --- Hand pose (requires a palm detection) ---
if (palm.Results.Count > 0)
{
using var hand = new HandPoseEstimator("handpose_estimation_mediapipe.onnx", "CPU");
hand.Infer(image, palm.Results[0]);
var pose = hand.Result;
if (pose != null)
{
Console.WriteLine($"Hand: {pose.Handedness}, conf={pose.Confidence:F3}");
foreach (var lm in pose.Landmarks)
Console.WriteLine($" ({lm.X:F3}, {lm.Y:F3}, z={lm.Z:F3})");
}
}
Person & Pose
using MediaPipeSharp.Person;
using MediaPipeSharp.Pose;
using var person = new PersonDetector("person_detection_mediapipe.onnx", "GPU");
person.InferImage(image);
if (person.Results.Count > 0)
{
using var pose = new PoseEstimator("pose_estimation_mediapipe.onnx", "GPU");
pose.Infer(image, person.Results[0]);
var r = pose.Result;
if (r != null)
{
Console.WriteLine($"Pose conf={r.Confidence:F3}, landmarks={r.Landmarks.Length}");
if (r.SegmentationMask != null)
Cv2.ImWrite("mask.png", r.SegmentationMask);
}
}
Device selection
Pass any OpenVINO device name: "CPU", "GPU", "NPU", "AUTO", etc.
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenCvSharp4 (>= 4.13.0.20260627)
- OpenCvSharp4.runtime.win (>= 4.13.0.20260627)
- OpenVINO.runtime.win (>= 2026.4.0)
-
net10.0
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenCvSharp4 (>= 4.13.0.20260627)
- OpenCvSharp4.runtime.win (>= 4.13.0.20260627)
- OpenVINO.runtime.win (>= 2026.4.0)
-
net6.0
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenCvSharp4 (>= 4.13.0.20260627)
- OpenCvSharp4.runtime.win (>= 4.13.0.20260627)
- OpenVINO.runtime.win (>= 2026.4.0)
-
net8.0
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenCvSharp4 (>= 4.13.0.20260627)
- OpenCvSharp4.runtime.win (>= 4.13.0.20260627)
- OpenVINO.runtime.win (>= 2026.4.0)
-
net9.0
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenCvSharp4 (>= 4.13.0.20260627)
- OpenCvSharp4.runtime.win (>= 4.13.0.20260627)
- OpenVINO.runtime.win (>= 2026.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.