Aucune description
  • JavaScript 78.7%
  • HTML 18.9%
  • Roff 1.7%
  • Java 0.7%
Aller au fichier
2026-04-07 15:25:43 +02:00
android fix: resolve mobile GPU bug and UI overlaps 2026-04-07 15:21:06 +02:00
assets fix: resolve S25 zoomed/black screen issues by disabling desynchronized rendering and fixing resolution detection 2026-03-13 11:38:12 +01:00
release chore: remove sensitive keystore files from git tracking 2026-04-07 15:25:43 +02:00
www fix: resolve mobile GPU bug and UI overlaps 2026-04-07 15:21:06 +02:00
.gitignore chore: remove sensitive keystore files from git tracking 2026-04-07 15:25:43 +02:00
capacitor.config.json feat: enable S25 compatibility with safe GPU/CPU fallbacks and debug logging 2026-03-13 11:36:03 +01:00
package-lock.json feat: enable S25 compatibility with safe GPU/CPU fallbacks and debug logging 2026-03-13 11:36:03 +01:00
package.json feat: enable S25 compatibility with safe GPU/CPU fallbacks and debug logging 2026-03-13 11:36:03 +01:00
README.md fix: resolve mobile GPU bug and UI overlaps 2026-04-07 15:21:06 +02:00

CALYPSO MediaPipe Face Mesh Demo

Important Finding: Android GPU Zooming Bug

During testing across different Android devices, we discovered a critical bug related to MediaPipe's WebGL execution (delegate: "GPU") on Android smartphones.

The Issue

On many Android smartphones (unlike tablets which often have desktop-class browsers or better GPU floating-point precision), initializing the MediaPipe FaceLandmarker with delegate: "GPU" does not throw an error.

However, it fails silently by causing compounding floating-point math errors across frames. This manifests as a "zooming" or "drifting" effect where the tracked face mesh grows infinitely in size and quickly disappears off-screen.

Because no exception is thrown by the WebGL context upon initialization, a standard try...catch block cannot detect or recover from this failure during runtime.

The Solution: Auto-Detection

We implemented an automatic device detection script in www/index.html using the navigator.userAgent to apply the correct hardware delegate based on the device:

// Android tablets typically omit "Mobile" in their user agent string, whereas smartphones include it.
const isSmartphone = /Mobile/i.test(navigator.userAgent);
const chosenDelegate = isSmartphone ? "CPU" : "GPU";
  • Smartphones: Are forced to use delegate: "CPU". This bypasses the WebGL precision issues entirely, keeping the tracking perfectly stable (with slightly higher battery usage).
  • Tablets: Are allowed to use delegate: "GPU". High-end tablets handle the high-precision WebGL calculations smoothly, providing faster processing and lower power consumption.

This allows us to deploy a single FaceMeshDemo.apk that performs optimally and reliably across both tablets and smartphones.