Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mediapipe python interface is not working on GPU based on the newest version. #3106

Closed
hujb48 opened this issue Feb 23, 2022 · 8 comments
Closed
Assignees
Labels
legacy:hands Hand tracking/gestures/etc platform:python MediaPipe Python issues type:build/install For Build and Installation issues

Comments

@hujb48
Copy link

hujb48 commented Feb 23, 2022

Please make sure that this is a build/installation issue and also refer to the troubleshooting documentation before raising any issues.

System information (Please provide as much relevant information as possible)

  • OS Platform and Distribution (e.g. Linux Ubuntu 16.04, Android 11, iOS 14.4): Linux Ubuntu 20.04
  • Compiler version (e.g. gcc/g++ 8 /Apple clang version 12.0.0): gcc 9.3.0
  • Programming Language and version ( e.g. C++ 14, Python 3.6, Java ): Python 3.9.4
  • Installed using virtualenv? pip? Conda? (if python): virtual env (By pip)
  • MediaPipe version: the newest 0.8.9
  • Bazel version: the newest 4.2.1

Describe the problem:
Hi, SIR, I have just followed the issue #1651 and issue #2691 to gain a '.whl' file for offline installation. The process of building is successful, then I use 'pip' command to install it offline via guide https://github.com/jiuqiant/mediapipe_python_aarch64, and then I run the 'Holistic' demo code, then got the same mistake like issue #2691. By the way, I also Imitated the example #2041 to correct the file "b/mediapipe/modules/pose_landmark/pose_landmark_gpu.pbtxt", the problem would also appeared like #2691, how could I do to solve the problem? What about "Pose" & "Hand" part? Maybe, the latest version of mediapipe is not satisfied with those solutions like #1651 #2041, and #2691?

[Provide the exact sequence of commands / steps that you executed before running into the problem]:
just like #1651 , #2691 and #2041
and follow the https://google.github.io/mediapipe/getting_started/python#building-mediapipe-python-package

Complete Logs:
Include Complete Log information or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached:

@hujb48 hujb48 added the type:build/install For Build and Installation issues label Feb 23, 2022
@sureshdagooglecom sureshdagooglecom added platform:python MediaPipe Python issues legacy:hands Hand tracking/gestures/etc labels Feb 23, 2022
@sureshdagooglecom
Copy link

Hi @hujb48 , can you refer media pipe official document for GPU issues.

@sureshdagooglecom sureshdagooglecom added the stat:awaiting response Waiting for user response label Feb 23, 2022
@hujb48
Copy link
Author

hujb48 commented Feb 23, 2022

Hi @hujb48 , can you refer media pipe official document for GPU issues.

Thx for the reply, it's very nice of you. Right now, I have followed the "OpenGL ES Setup on Linux Desktop" from the page you given. The first of the part has been done successfully, which is "check if your Linux desktop GPU can run MediaPipe with OpenGL ES". Then I used this command for the building process in my virtual env,
' bazel build --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 '
but anather mistake appears:

2022/02/23 19:49:40 could not resolve the version 'latest' to an actual version number: unable to determine latest version: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/": read tcp 10.10.52.142:60808->172.217.160.106:443: read: connection reset by peer

So, my question is how to deal with it? By the way, I am unfamiliar with those building process, however I refer the mediapipe python guide to build a .whl file for offline installation, which can successfully be used on CPU, while it is hard to use on GPU for python. The old version of mediapipe can been operated like #2041 an #1651, but those solutions are not adapted to the latest version of mediapipe, or maybe some mistakes have made during the correction in #2691? So could you give some advise on how to run this API on GPU easily and clearly?

@sureshdagooglecom
Copy link

MediaPipe Python package only contains CPU graphs. If you need to run any GPU graphs, see #1651 (comment).

@hujb48
Copy link
Author

hujb48 commented Mar 11, 2022

MediaPipe Python package only contains CPU graphs. If you need to run any GPU graphs, see #1651 (comment).

Yes sir, but regrettably, it isn't worked on the right now version of Mediapipe which is 0.8.9. By the way, the old version of the Mediapipe is not suitable for my project due to the absence of the 3D world coordinates of the hand.
Thus, how to run any GPU graphs on the latest version?

@sureshdagooglecom
Copy link

@hujb48 ,
we don't have python GPU graphs , it is only available for CPU.

@kuaashish kuaashish assigned kuaashish and unassigned NikolayChirkov Jan 6, 2023
@kuaashish kuaashish added stat:awaiting response Waiting for user response and removed stat:awaiting googler Waiting for Google Engineer's Response labels Jan 6, 2023
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@google-ml-butler
Copy link

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

@kuaashish kuaashish removed the stat:awaiting response Waiting for user response label Jan 20, 2023
@kuaashish kuaashish removed the stale label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:hands Hand tracking/gestures/etc platform:python MediaPipe Python issues type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

5 participants