All face/mask/makeup effects work perfectly, but every background-segmentation effect hard-freezes the render thread — the preview stops updating permanently and the app must be force-closed.
Environment
- DeepAR Android SDK 5.6.22 (
ai.deepar.ar:DeepAR:5.6.22) - Pixel 10 Pro — Tensor G5, Android 17 (API 37), build CP2A.260805.005
- Integration: CameraX
ImageAnalysis(RGBA_8888, front, mirrored) →receiveFrame(...); render viasetRenderSurface()to aSurfaceView. Matches yourquickstart-android-java. - Manifest has
<uses-native-library android:name="libOpenCL.so" android:required="false"/>andlibOpenCL-pixel.so.
Reproduces with all three (identical freeze):
switchEffect("effect", ".../galaxy_background.deepar")(background replacement)- the built-in
background_blur.deeparviaswitchEffect - the
backgroundBlur(true, 50)API (no effect file)
Logcat the instant a background effect is applied, then the render thread hangs:
I/tflite: Created TensorFlow Lite delegate for GPU.
I/tflite: Loaded OpenCL library with dlopen.
I/tflite: Replacing 175 out of 175 node(s) with delegate (TfLiteGpuDelegateV2) node, yielding 1 partitions for subgraph 0.
It appeared to work once, then began freezing consistently.
Ruled out (all still freeze): clearing app cache/storage; a full device reboot; running the call off the main thread; backgroundBlur() API vs the .deepar file; OpenCL <uses-native-library> present (and, as a test, removed — TFLite then falls through to the ICD loader / GL and still engages the GPU). Latest SDK (5.6.22).
Likely the segmentation model (~175 nodes) on the TFLite GPU/OpenCL delegate hangs the Tensor G5 GPU; face tracking doesn’t hit that path, so it’s fine.
Questions
- Is there any way — an init option, an undocumented flag, or a DeepAR Studio per-effect setting — to force CPU inference / disable the GPU delegate for segmentation?
- Is the Tensor G5 (Pixel 10 Pro) GPU a known-incompatible target for background segmentation? Is a fix planned?
Seems related to the open thread “switchEffect()/switchEffectWithPath() silently hangs forever on Android — no error, no callback.”