mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

couldn't use kaggle GPU

Open mohamedaissaoui2000 opened this issue 1 year ago • 2 comments

OS Platform and Distribution

Kaggle

Compiler version

No response

Programming Language and version

Python

Installed using virtualenv? pip? Conda?(if python)

pip

MediaPipe version

mediapipe-0.10.11 sounddevice-0.4.6

Bazel version

No response

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

4.9.0 (kaggle)

Describe the problem

A bug happened!

Complete Logs

Cell In[11], line 15, in dataset(train_folders, test_folder)
     13 video_full_path = os.path.join(root, video_filename)
     14 print(video_full_path)
---> 15 signal = process_video(video_full_path)
     16 smoothed_signal = smooth_signal(signal)
     17 blinks = extract_blinks(smoothed_signal)  

Cell In[7], line 9, in process_video(video_path)
      3 '''
      4 Input : video
      5 Output : list of ear values (signal)
      6 '''
      8 ear_values = []
----> 9 with FaceLandmarker.create_from_options(options) as landmarker:
     10    
     11 
     12     # --- OpenCV setup ---
     13     video_path = video_path
     14     cap = cv2.VideoCapture(video_path)

File /opt/conda/lib/python3.10/site-packages/mediapipe/tasks/python/vision/face_landmarker.py:3104, in FaceLandmarker.create_from_options(cls, options)
   3091   output_streams.append(
   3092       ':'.join([_FACE_GEOMETRY_TAG, _FACE_GEOMETRY_STREAM_NAME])
   3093   )
   3095 task_info = _TaskInfo(
   3096     task_graph=_TASK_GRAPH_NAME,
   3097     input_streams=[
   (...)
   3102     task_options=options,
   3103 )
-> 3104 return cls(
   3105     task_info.generate_graph_config(
   3106         enable_flow_limiting=options.running_mode
   3107         == _RunningMode.LIVE_STREAM
   3108     ),
   3109     options.running_mode,
   3110     packets_callback if options.result_callback else None,
   3111 )

File /opt/conda/lib/python3.10/site-packages/mediapipe/tasks/python/vision/core/base_vision_task_api.py:70, in BaseVisionTaskApi.__init__(self, graph_config, running_mode, packet_callback)
     65 elif packet_callback:
     66   raise ValueError(
     67       'The vision task is in image or video mode, a user-defined result '
     68       'callback should not be provided.'
     69   )
---> 70 self._runner = _TaskRunner.create(graph_config, packet_callback)
     71 self._running_mode = running_mode

RuntimeError: Service "kGpuService", required by node mediapipe_tasks_vision_face_landmarker_facelandmarkergraph__mediapipe_tasks_vision_face_detector_facedetectorgraph__mediapipe_tasks_core_inferencesubgraph__inferencecalculator__mediapipe_tasks_vision_face_landmarker_facelandmarkergraph__mediapipe_tasks_vision_face_detector_facedetectorgraph__mediapipe_tasks_core_inferencesubgraph__InferenceCalculator, was not provided and cannot be created: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:77) display != EGL_NO_DISPLAYeglGetDisplay() returned error 0x300c

mohamedaissaoui2000 avatar Apr 26 '24 09:04 mohamedaissaoui2000

Hi @mohamedaissaoui2000,

We have not tested this scenario on Kaggle yet, but it seems like an interesting runtime that we should explore further. However, please grant us some time to work on it. We will provide you with updates once discuss with team. Thank you for your understanding.

kuaashish avatar Apr 30 '24 07:04 kuaashish

Thank you so much for your response,

On Tue, 30 Apr 2024, 08:31 kuaashish, @.***> wrote:

Hi @mohamedaissaoui2000 https://github.com/mohamedaissaoui2000,

We have not tested this scenario on Kaggle yet, but it seems like an interesting runtime that we should explore further. However, please grant us some time to work on it. We will provide you with updates once discuss with team. Thank you for your understanding.

— Reply to this email directly, view it on GitHub https://github.com/google/mediapipe/issues/5352#issuecomment-2084590996, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEW7XHHBQY7L2UNQPJHL7DDY75CGNAVCNFSM6AAAAABG2NH5XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUGU4TAOJZGY . You are receiving this because you were mentioned.Message ID: @.***>

mohamedaissaoui2000 avatar Apr 30 '24 23:04 mohamedaissaoui2000

We have only tested on Ubuntu and Codelab GPU. If you want to use Kaggle, I recommend using our CPU runtime.

schmidt-sebastian avatar May 16 '24 15:05 schmidt-sebastian

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar May 24 '24 01:05 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar May 31 '24 01:05 github-actions[bot]

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

google-ml-butler[bot] avatar May 31 '24 01:05 google-ml-butler[bot]