-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Why there are only _cpu.binarytxt file exist in my module folder after python -m pip install mediapipe #5412
Comments
Hi @Terrywang2001, It must support the GPU in Ubuntu, To better understand and address the issue, please provide the following:
Thank you!! |
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. |
So the only code I used is 'python -m pip install mediapipe'. I installed this through my terminal, and when the download finished, only the cpu.binarytxt appeared, but not gpu.binarytxt. |
Hi @Terrywang2001, Could you please test this code using a GPU as the delegate? It works fine for me, and I would appreciate knowing if it works for you as well. Visualization utilities
Running inference and visualizing the results
Please adjust the task file path according to your OS and update the input image path accordingly. Thank you!! |
Hi @Terrywang2001, We are currently unaware of this file. Could you please provide the specific use case for this file? Understanding your requirements will help us address the issue more effectively. If your query pertains to running the face landmarker on GPU, it is functioning correctly based on my tests and your comments. Thank you!! |
Oh it's because I want to use the prebuilt solution. |
Hi @Terrywang2001, It appears you are still using our legacy face detection model instead of the new one, so there is no option to switch between the short-range and full-range models. We recommend using our new Task Face Landmarker API as example provided above. If you are missing a specific file, it may be because you need to build from source to obtain the gpu.binarypb file. You can try using a command similar to the one below:
Thank you!! |
OS Platform and Distribution
Ubuntu 20.04
Compiler version
No response
Programming Language and version
Python 3.9
Installed using virtualenv? pip? Conda?(if python)
pip
MediaPipe version
0.10.14
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)
No response
Describe the problem
python -m pip install mediapipe
Complete Logs
I want to use the face_landmarker model on GPU. But after I installed mediapipe, it occurs to me that in /modules/face_landmark folder, the only binarytxt file is face_landmark_front_cpu.binarypb, but shouldn't there be a face_landmark_front_gpu.binarypb file if I want to use solution on GPU? If so, how can I get such file.
Under this circumstance, I followed all the instruction from Face Landmarker Example Code: https://colab.research.google.com/github/googlesamples/mediapipe/blob/main/examples/face_landmarker/python/%5BMediaPipe_Python_Tasks%5D_Face_Landmarker.ipynb. I copied all the necessary code and change the based_option to be the following: base_options = python.BaseOptions(model_asset_path='/absolute/path/face_landmarker.task', delegate=mp.tasks.BaseOptions.Delegate.GPU). But after running this it shows the following error:ValueError: The model is not a valid Flatbuffer buffer. How can I fix this?
The text was updated successfully, but these errors were encountered: