-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Facemesh android cpu crash #5848
Comments
Hi @yonger001, Please provide the complete standalone code to help us understand and reproduce the issue if needed. Alternatively, you can point out the documentation you are following. This will help us to understand the issue better. Thank you!! |
package com.google.mediapipe.examples.facemesh; import android.content.Intent; /** Main activity of MediaPipe Face Mesh app. */ private long startTime; // private FaceMesh facemesh; private enum InputSource { private SolutionGlSurfaceView glSurfaceView; @OverRide @OverRide @OverRide private Bitmap downscaleBitmap(Bitmap originalBitmap) { private Bitmap rotateBitmap(Bitmap inputBitmap, InputStream imageData) throws IOException { /** Sets up the UI components for the static image demo. / /** Sets up core workflow for static image mode. */
} /** Sets up the UI components for the video demo. / /** Sets up the UI components for the live demo with camera input. */ /** Sets up core workflow for streaming mode. */
// glSurfaceView.getLayoutParams().width = 640;
// glSurfaceView.getLayoutParams().width = 640; private void startCamera() {
// glSurfaceView.getLayoutParams().width = 640; private void stopCurrentPipeline() { private void logNoseLandmark(FaceMeshResult result, boolean showPixelValues) { |
Hi @yonger001, Unfortunately, you are using the legacy Face Mesh solution for Android, which has been upgraded and is now part of the Face Landmarker Task API. You can find the overview page here and the implementation guide for Android here . Support for the legacy Face Mesh has been completely discontinued. Please implement the updated API on a physical Android device and let us know if you encounter any issues. Thank you!! |
Do you mean the FaceMesh in version v0.10.20 of MediaPipe-solutions-examples is the legacy version? |
Hi @yonger001, Correct. Support for this has not been maintained since the introduction of the Face Landmarker. You can refer to the documentation for details on the upgraded Task API solution. The newer Maven package for Face Landmarker is available here, and you can find the overview page and Android details in the comment above. Thank you!! |
Hi @yonger001, Please review the above comment and try using the newer API. We also recommend closing this issue so we can mark it as resolved internally. If you encounter any further issues with the newer API, please raise a new issue with a complete error log and steps to reproduce. We will certainly look into it. 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. |
This issue was closed due to lack of activity after being marked stale for past 7 days. |
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
Linux ubuntu 20.04, Android 14,samsung SM-A5360
MediaPipe Tasks SDK version
MediaPipe v0.10.20 Latest on Dec 19, 2024
Task name (e.g. Image classification, Gesture recognition etc.)
FaceMesh
Programming Language and version (e.g. C++, Python, Java)
Android
Describe the actual behavior
When RUN_ON_GPU=false is set, clicking START CAMERA causes an immediate crash
Describe the expected behaviour
FaceMesh task successfully runs with the camera mode on CPU
Standalone code/steps you may have used to try to get what you need
just running the facemesh example of MediaPipe v0.10.20
Other info / Complete Logs
The text was updated successfully, but these errors were encountered: