mediapipe
mediapipe copied to clipboard
Service "kGpuService", required by node mediapipe_tasks_vision_hand_landmarker_handlandmarkergraph
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
I am getting the same issue in Google Colab as well
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!!
Colab/EC2 needs a virtual display for MediaPipe to work
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
Hi @Ashlin-Gov,
Please review the above suggestion and provide an update on the status.
Thank you!!
Hi @kuaashish
The suggestion above @kinarr resolved the issue, managed to create an AMI based off the suggestion above for EC2.
Thanks
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?