Medipipe facemesh not using the GPU

Viewed 33

I was trying to use the media pipe face mesh on Linux Ubuntu 18.04(Nvidia GeForce GTX 1080).After Successfully building the media pipe face mesh on GPU using this documentation https://google.github.io/mediapipe/getting_started/gpu_support.html. In the runtime, it's not using the GPU.

In the runtime got the following log: Output:

I20220920 10:08:15.725648 18297 demo_run_graph_main_gpu.cc:58] Initialize the calculator graph.
I20220920 10:08:15.728091 18297 demo_run_graph_main_gpu.cc:62] Initialize the GPU.
libEGL warning: DRI2: failed to authenticate
I20220920 10:08:15.770144 18297 gl_context_egl.cc:84] Successfully initialized EGL. Major : 1 Minor: 4
I20220920 10:08:15.778117 18322 gl_context.cc:335] GL version: 3.1 (OpenGL ES 3.1 Mesa 20.0.8)
I20220920 10:08:15.778229 18297 demo_run_graph_main_gpu.cc:68] Initialize the camera or load the video.
I20220920 10:08:15.790952 18297 demo_run_graph_main_gpu.cc:89] Start running the calculator graph.
I20220920 10:08:15.794411 18297 demo_run_graph_main_gpu.cc:94] Start grabbing and processing frames.
INFO: Created TensorFlow Lite delegate for GPU.
I20220920 10:08:20.419745 18297 demo_run_graph_main_gpu.cc:171] Prepare video writer.
I20220920 10:13:23.774732 18297 demo_run_graph_main_gpu.cc:105] Empty frame, end of video reached.
I20220920 10:13:23.774749 18297 demo_run_graph_main_gpu.cc:186] Shutting down.
I20220920 10:13:24.021384 18297 demo_run_graph_main_gpu.cc:201] Success!
Aborted

Build command: bazel build -c opt --config=cuda --spawn_strategy=local --define no_aws_support=true --copt -DMESA_EGL_NO_X11_HEADERS mediapipe/examples/desktop/face_mesh:face_mesh_gpu

Output:

Target //mediapipe/examples/desktop/face_mesh:face_mesh_gpu up-to-date:
  bazel-bin/mediapipe/examples/desktop/face_mesh/face_mesh_gpu
INFO: Elapsed time: 310.885s, Critical Path: 210.43s
INFO: 3126 processes: 855 internal, 2271 local.
INFO: Build completed successfully, 3126 total actions

Run command: GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/face_mesh/face_mesh_gpu --calculator_graph_config_file=mediapipe/graphs/face_mesh/face_mesh_desktop_live_gpu.pbtxt --input_video_path="/home/neuron/Desktop/gpu_mediapipe/video.mp4" --output_video_path="/home/neuron/Desktop/mediapipe_fresh/video_gpu.mp4"

While the run ongoing GPU usage shows 0%,

GPU usage command: nvidia-smi --query-gpu=utilization.gpu --format=csv --loop=1

Output:

utilization.gpu [%]
0 %
0 %
0 %
0 %
0 %
0 %
.
.
0 Answers
Related