Skip to content

OstrichHermit/OH-Unity-GameDev-Skills / media-pipe-unity-skill

media-pipe-unity

Verified

MediaPipe Unity Plugin 集成。用于计算机视觉任务、手部/面部/姿态追踪、手势识别、目标检测以及 Unity 中的 ML 解决方案。

references/FAQ.md

View on GitHub
# Build/Installation
## Is there any negative impact on performance by using Docker?

Docker is only used to build native libraries, not at runtime, so there is no impact on performance.\
It is possible that the build time will increase (especially when the host OS is Windows), but unless you are building libraries repeatedly, it should be much less stressful than installing all the dependent tools manually.

## How much CPU and memory should be allocated to a Docker container?
You don't need to mind this issue if your host OS is Linux, but on Windows, you need to specify `--cpus` and `--memory` option when starting a container.

According to my rule of thumb, it is better to adjust the parameters as follows (this doesn't apply if you have too little memory):

1. When starting [Windows container](https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide#docker-windows-container), allocate more than `1.2g * [cpus]` memory.

   ```bat
   docker run --cpus=8 --memory=10g -it mediapipe_unity:windows
   ```

1. But if you'd like to build libraries for Android on Windows container, allocate more than `1.5g * [cpus]` memory.

   ```bat
   docker run --cpus=8 --memory=12g -it mediapipe_unity:windows
   ```

1. On the other hand, when starting [Linux container](https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide#docker-linux-container), allocate more than `1g * [cpus]` memory.

   ```bat
   docker run --cpus=8 --memory=8g -it mediapipe_unity:linux
   ```

## How to reduce the plugin size?

Strip symbols from native libraries. See [Build Command](https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide#build-command) for more details.

# Development
## UnityEditor crashes!
When some errors occur, MediaPipe doesn't throw an exception but aborts the whole program (signals `SIGABRT`).\
It is not fatal in production since the application should crash in such a situation after all, but in a development environment, it is very annoying since the UnityEditor crashes.

On Linux and macOS, this plugin avoids UnityEditor crashing by handling `SIGABRT`, so if UnityEditor crashes, please let us know!\
On Windows, there seem to be no ways to handle `SIGABRT` properly, so if you cannot tolerate this, use a different OS.

## InternalException: INTERNAL: ; eglMakeCurrent() returned error 0x3000

If you encounter an error like below and you use OpenGL Core as the Unity's graphics APIs, please try Vulkan.

```txt
InternalException: INTERNAL: ; eglMakeCurrent() returned error 0x3000_mediapipe/mediapipe/gpu/gl_context_egl.cc:261)
```
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall