Mediapipe: Is it possible to implement Windows Desktop GPU Support using the ANGLE library?

Created on 16 Apr 2020  路  5Comments  路  Source: google/mediapipe

Please correct me if I'm wrong about anything. My understanding of MediaPipe is limited :)

From what I've read, MediaPipe only supports GPU acceleration on Linux, Android, iOS, and the web. I want to create an application using the hand tracking demo which can run on Windows with a desktop GPU. However, it is not supported. I believe that by using the already-built ANGLE library, along with MediaPipe's OpenGL ES 3.1 backend, it is possible to implement Windows desktop support through OpenGL ES 3.1 emulation. Is this feasible, or is there something I'm missing? Thanks.

Most helpful comment

To future visitors, yes it is possible. Angle can be used as the GL ES implementation. I was able to get it running on a windows machine with vulkan backend being used for Angle. In mediapipe source aside from GL ES itself, there are a few calls to the p_thread api as well that have to be changed, but it's trivial to replace them with std::thread equivalents.

All 5 comments

Unfortunately, MediaPipe doesn't support Windows yet.

I am aware of that. I was wondering if it was possible to port it to Windows using ANGLE myself.

To future visitors, yes it is possible. Angle can be used as the GL ES implementation. I was able to get it running on a windows machine with vulkan backend being used for Angle. In mediapipe source aside from GL ES itself, there are a few calls to the p_thread api as well that have to be changed, but it's trivial to replace them with std::thread equivalents.

That answers my question. Thank you!

If anyone's interested here's how I changed mediapipe source to work with gpu on windows: angle vulkan, pthread refactor. Besides this there's a couple more compilation errors in the tensorflow library gpu code when compiling with msvc but they are simple syntax replacements. Note that these changes will likely only work on Windows.

I also faced an issue with angle-vulkan on my machine where GLSyncWait call doesn't work as intended with GL_SYNC_FLUSH_COMMANDS_BIT flag. Manually adding a glFlush before the wait fixed the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

baocareos picture baocareos  路  5Comments

AlexYiningLiu picture AlexYiningLiu  路  3Comments

PrinceP picture PrinceP  路  5Comments

7AM7 picture 7AM7  路  5Comments

davidakr picture davidakr  路  4Comments