Search code examples
pythontensorflow-litemediapipepose-detection

How to run MediaPipe's Pose Landmark Detection on a GPU


I am able to run MediaPipe's Pose Landmark detection on my Windows 10 computer by following this tutorial here: https://google.github.io/mediapipe/solutions/pose.html#python-solution-api, but I'm not sure how I can run this example using a GPU.

I know that it is quite fast to run on CPU, but I want to use the model with model_complexity=2 since its most accurate, but this makes it slow on my CPU (around 5 FPS). I have GPU, so if I can run on a GPU it will speed things up a lot.

I found these following resources.

It mentions GPU in these links but I'm not sure how I can utilize these modules. If someone could provide a link or a quick explanation on how to run MediaPipe's Pose Landmark detection on a GPU, I would greatly appreciate it.


Solution

  • TensorFlow Lite GPU delegate is majorly designed for mobile phone accelerations. See also https://www.tensorflow.org/lite/performance/gpu.

    Experimentally, the OpenCL backend in TFLite GPU delegate can be supported through Linux platforms. However, we have not verified it on Windows yet.

    See also https://github.com/tensorflow/tensorflow/issues/40325#issuecomment-642143623.