mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Service "kGpuService", required by node mediapipe_tasks_vision_hand_landmarker_handlandmarkergraph

Open Ashlin-Gov opened this issue 1 year ago • 2 comments

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

No

OS Platform and Distribution

Linux Ubuntu 24.04

MediaPipe Tasks SDK version

latest

Task name (e.g. Image classification, Gesture recognition etc.)

Hand Landmarker

Programming Language and version (e.g. C++, Python, Java)

Python

Describe the actual behavior

After enabling GPU Delegate the task fails

Describe the expected behaviour

Have the Hand landmarker task run with GPU delegate on EC2 instance

Standalone code/steps you may have used to try to get what you need

I enabled the GPU Delegate as described here - https://github.com/google-ai-edge/mediapipe/issues/5426. Worked fine on m1 chip. Fails on EC2 with g4dn.xlarge instance


ERROR - Service "kGpuService", required by node mediapipe_tasks_vision_hand_landmarker_handlandmarkergraph__mediapipe_tasks_vision_hand_detector_handdetectorgraph__mediapipe_tasks_core_inferencesubgraph__inferencecalculator__mediapipe_tasks_vision_hand_landmarker_handlandmarkergraph__mediapipe_tasks_vision_hand_detector_handdetectorgraph__mediapipe_tasks_core_inferencesubgraph__InferenceCalculator, was not provided and cannot be created: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:84) egl_initializedUnable to initialize EGL

Other info / Complete Logs

No response

Ashlin-Gov avatar Jun 25 '24 10:06 Ashlin-Gov

I am getting the same issue in Google Colab as well

Ashlin-Gov avatar Jun 25 '24 10:06 Ashlin-Gov

Hi @Ashlin-Gov,

I have reproduced the issue on Colab and encountered the same error. However, we cannot guarantee it will occur on EC2 since our primary testing has been on regular Ubuntu, macOS, and Colab. Please allow me some time; I will come back with update.

Thank you!!

kuaashish avatar Jun 26 '24 08:06 kuaashish

Colab/EC2 needs a virtual display for MediaPipe to work

kinarr avatar Jul 03 '24 17:07 kinarr

I remember writing this Colab to benchmark some of the tasks back then and I hope you find it useful https://colab.research.google.com/gist/kinarr/e9c7d99eef33c1c3a9f596b74f491f50/-10-31-23-mediapipe-tasks-gpu-support-benchmark.ipynb

kinarr avatar Jul 03 '24 17:07 kinarr

Hi @Ashlin-Gov,

Please review the above suggestion and provide an update on the status.

Thank you!!

kuaashish avatar Jul 04 '24 05:07 kuaashish

Hi @kuaashish

The suggestion above @kinarr resolved the issue, managed to create an AMI based off the suggestion above for EC2.

Thanks

Ashlin-Gov avatar Jul 04 '24 18:07 Ashlin-Gov

Hi @Ashlin-Gov,

Thank you for the confirmation. We are glad we could assist you. If the issue is resolved on your end, may we proceed to close and mark it as resolved internally?

kuaashish avatar Jul 05 '24 08:07 kuaashish

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Jul 06 '24 11:07 google-ml-butler[bot]