homuler / MediaPipeUnityPlugin

Unity plugin to run MediaPipe
MIT License
1.84k stars 468 forks source link

Request for Guidance on Customizing Calculators #1278

Open Candlend opened 4 days ago

Candlend commented 4 days ago

Plugin Version or Commit ID

v0.15.0

Unity Version

2022.3.53f1

Your Host OS

macos Sequoia 15.1.1

Target Platform

iOS

Description

I’m looking to add a Custom Calculator or tweak the existing Calculator in MediaPipeUnityPlugin. I saw there’s a section for Custom Calculators in the wiki, but it’s empty.

I want to modify HolisticLandmarkGpu to only include body and hand landmarks, leaving out the facial ones. In the original MediaPipe, there’s a holistic_landmark_gpu.pbtxt file that I can edit, but it seems like the structure in MediaPipeUnityPlugin is different.

Could anyone guide me on how to do this? Any tips or pointers would be awesome!

Thanks a bunch!

Code to Reproduce the issue

No response

Additional Context

No response

Candlend commented 1 day ago

In fact, what I want is to modify or add a subgraph.

homuler commented 15 hours ago

If you want to modify an existing subgraph, you need to apply a patch to MediaPipe and rebuild the plugin. For more details, please refer to https://github.com/homuler/MediaPipeUnityPlugin/issues/242#issuecomment-900249401 and https://github.com/homuler/MediaPipeUnityPlugin/issues/1122. Please see also https://github.com/homuler/MediaPipeUnityPlugin/issues/277#issuecomment-921433238.