Mediapipe.Net.Runtime.CPU.kaymyst 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Mediapipe.Net.Runtime.CPU.kaymyst --version 1.0.3                
NuGet\Install-Package Mediapipe.Net.Runtime.CPU.kaymyst -Version 1.0.3                
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="Mediapipe.Net.Runtime.CPU.kaymyst" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mediapipe.Net.Runtime.CPU.kaymyst --version 1.0.3                
#r "nuget: Mediapipe.Net.Runtime.CPU.kaymyst, 1.0.3"                
#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.
// Install Mediapipe.Net.Runtime.CPU.kaymyst as a Cake Addin
#addin nuget:?package=Mediapipe.Net.Runtime.CPU.kaymyst&version=1.0.3

// Install Mediapipe.Net.Runtime.CPU.kaymyst as a Cake Tool
#tool nuget:?package=Mediapipe.Net.Runtime.CPU.kaymyst&version=1.0.3                

MediaPipe.NET.Runtime

Native library package for MediaPipe.NET.

Discord NuGet NuGet Deploy workflow CI workflow

This is the first half of the port of MediaPipeUnityPlugin, in order to use MediaPipe on the latest .NET environment. The goal is to separate the actual C# bindings from the native library into 2 different workflows to increase productivity and efficiency. We think it will drastically improve maintainability as we'll be able to take better advantage of CI and other things like GitHub releases.

We take homuler's Mediapipe C API and building utilities almost completely as-is, use them to build a native Mediapipe library, and ship all libraries for different OSes into one Nuget native runtime package: Mediapipe.Net.Runtime.

Since the workflow also generated C# Protobuf sources, we decided to also bundle them in their own Nuget package. This helps separating the source code from an auto-generated one, and also makes more sense when it comes to package releases.

A few key points to note:

  • The namespace where all C# Protobuf sources belong is Mediapipe.Net.Framework.Protobuf, to match our MediaPipe.NET namespaces.
  • On Windows, the name of the native library is mediapipe_c.dll rather than libmediapipe_c.dll as it makes more sense on Windows and helps avoiding confusion when making bindings to it.
  • Since the native library can be shipped in CPU and GPU version, we ship both in their individual Nuget package: Mediapipe.Net.Runtime.CPU and Mediapipe.Net.Runtime.GPU. Since Mediapipe only supports GPU computation on Linux as of now, it also means that Mediapipe.Net.Runtime.GPU only bundles a Linux native library.
  • We considerably changed the build.py script to adapt for this workflow. For example, some things are not downloaded as they are only relevant in Unity, and options such as --protobuf and --install have been added to better control the build process.

Build instructions

Coming soon!

While waiting, you can look at the MediaPipeUnityPlugin installation guide, as it already gives a very good indication on how to build the native libraries. Most if not every command there will also work here.

You can also check some of our CI files and look at the commands used for something more accurate but less commented.

Generating new patchfiles for third_party

To generate new patches for third_party (especially when dealing with Protobuf namespaces), you must clone the mediapipe repository that corresponds to the version being tagged.

#  for example we will be cloning 0.9.1
$ git clone https://github.com/google/mediapipe -b 0.9.1

Then cd to the mediapipe folder and make your changes. Once satisfied, generate your patchfile using git like so:

$ git diff -p --output=patch.diff

Keep in mind patches must be limited to the area they're supposed to modify. Follow the format in third_party if possible.

If you're editing an existing patch, just replace the file like so, however, if you're making a new patch for use in MP.NET, make sure you add it to the WORKSPACE file under patches.

License

This repository is licensed under the MIT license. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.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

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.8 197 6/18/2024
1.0.7 106 6/14/2024
1.0.6 93 6/14/2024
1.0.5 95 6/14/2024
1.0.4 105 6/14/2024
1.0.3 77 6/14/2024