mediapipe
mediapipe copied to clipboard
mediapipe start error
Please make sure that this is a bug and also refer to the troubleshooting, FAQ documentation before raising any issues.
System information (Please provide as much relevant information as possible)
- Have I written custom code (as opposed to using a stock example script provided in MediaPipe): NO custom code
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04, Android 11, iOS 14.4): Android 10
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: Samsung Note9
- Browser and version (e.g. Google Chrome, Safari) if the issue happens on browser:
- Programming Language and version ( e.g. C++, Python, Java): Java
- MediaPipe version: v0.8.10.2
- Bazel version (if compiling from source): 5.2.0
- Solution ( e.g. FaceMesh, Pose, Holistic ): Holistic
- Android Studio, NDK, SDK versions (if issue is related to building in Android environment):
- Xcode & Tulsi version (if issue is related to building for iOS):
Describe the current behavior:
In the Android environment, when testing holistic using mediapipe_holistic.aar, the following two types of errors occur during the start process. So the mediapipe doesn't work.
Describe the expected behavior: The mediapipe should be working fine with no errors.
Standalone code to reproduce the issue: Provide a reproducible test case that is the bare minimum necessary to replicate the problem. If possible, please share a link to Colab/repo link /any notebook:
If I start and stop the app repeatedly, it happens about 1 in 10 times.
Other info / Complete Logs :
- First Error log :
2022-08-22 12:58:18.369 11429-11464/com.example.mediapipe I/tflite: Initialized TensorFlow Lite runtime. 2022-08-22 12:58:18.372 11429-11490/com.example.mediapipe I/native: I20211122 12:58:18.372244 11490 resource_util_android.cc:89] Successfully loaded: face_landmark_with_attention.tflite 2022-08-22 12:58:18.373 11429-11464/com.example.mediapipe I/tflite: Replacing 291 node(s) with delegate (unknown) node, yielding 1 partitions. 2022-08-22 12:58:18.374 11429-11488/com.example.mediapipe I/native: I20211122 12:58:18.374675 11488 resource_util_android.cc:89] Successfully loaded: hand_landmark_full.tflite 2022-08-22 12:58:18.382 11429-11489/com.example.mediapipe I/native: I20211122 12:58:18.382668 11489 resource_util_android.cc:89] Successfully loaded: pose_landmark_full.tflite 2022-08-22 12:58:18.384 11429-11491/com.example.mediapipe I/native: I20211122 12:58:18.384884 11491 resource_util_android.cc:89] Successfully loaded: hand_landmark_full.tflite 2022-08-22 12:58:18.398 11429-11465/com.example.mediapipe D/ExternalTextureConv: Created output texture: 5 width: 1280 height: 720 2022-08-22 12:58:18.400 11429-11465/com.example.mediapipe E/FrameProcessor: Mediapipe error: com.google.mediapipe.framework.MediaPipeException: unknown: Graph has errors: Calculator::Open() for node "holisticlandmarkgpu__handlandmarksleftandrightgpu__handlandmarksfromposegpu_1__handlandmarkgpu__handlandmarkmodelloader__LocalFileContentsCalculator" failed: Failed to read file
- Second Error log:
2022-08-22 12:55:40.611 10731-10766/com.example.mediapipe I/tflite: Replacing 63 node(s) with delegate (TfLiteGpuDelegate) node, yielding 1 partitions. 2022-08-22 12:55:40.630 10731-10766/com.example.mediapipe I/native: I20211122 12:55:40.630920 10766 resource_util_android.cc:89] Successfully loaded: hand_recrop.tflite 2022-08-22 12:55:40.631 10731-10766/com.example.mediapipe I/tflite: Replacing 63 node(s) with delegate (TfLiteGpuDelegate) node, yielding 1 partitions. 2022-08-22 12:55:40.648 10731-10766/com.example.mediapipe E/tflite: Following operations are not supported by GPU delegate: DEQUANTIZE: DEQUANTIZE: Operation is not supported. 63 operations will run on the GPU, and the remaining 102 operations will run on the CPU. 2022-08-22 12:55:40.648 10731-10766/com.example.mediapipe I/tflite: Replacing 63 node(s) with delegate (TfLiteGpuDelegate) node, yielding 2 partitions. 2022-08-22 12:55:40.651 10731-10766/com.example.mediapipe E/tflite: TfLiteGpuDelegate Prepare: Only identical batch dimension is supported 2022-08-22 12:55:40.651 10731-10766/com.example.mediapipe E/tflite: Node number 165 (TfLiteGpuDelegate) failed to prepare. 2022-08-22 12:55:40.651 10731-10766/com.example.mediapipe E/tflite: Restored original execution plan after delegate application failure. 2022-08-22 12:55:40.651 10731-10766/com.example.mediapipe I/native: I20211122 12:55:40.651878 10766 resource_util_android.cc:89] Successfully loaded: face_detection_short_range.tflite 2022-08-22 12:55:40.652 10731-10766/com.example.mediapipe I/tflite: Replacing 164 node(s) with delegate (unknown) node, yielding 1 partitions. 2022-08-22 12:55:40.653 10731-10766/com.example.mediapipe I/tflite: Replacing 164 node(s) with delegate (unknown) node, yielding 1 partitions. 2022-08-22 12:55:40.667 10731-10767/com.example.mediapipe E/FrameProcessor: Mediapipe error: com.google.mediapipe.framework.MediaPipeException: internal: Graph has errors: Calculator::Open() for node "holisticlandmarkgpu__handlandmarksleftandrightgpu__handlandmarksfromposegpu_1__handlandmarkgpu__inferencecalculator__holisticlandmarkgpu__handlandmarksleftandrightgpu__handlandmarksfromposegpu_1__handlandmarkgpu__InferenceCalculator" failed: ; RET_CHECK failure (mediapipe/calculators/tensor/inference_calculator_gl.cc:222) (interpreter_->ModifyGraphWithDelegate(delegate_.get()))==(kTfLiteOk)
Please help me how to get rid of that error.
Hi @jaewoolim , Could you provide steps to reproduce this issue.
Hi @sureshdagooglecom I made holistic example using mediapipe_holistic.aar and holistic_tracking_gpu.binarypb according to guide of building mediapipe. and also I made android app with mediapipe_holistic.aar and holistic_tracking_gpu.binarypb according to guide of holisticActivity. Using android studio, the app was run through install. Error happens about 1 in 10 times. If you need any information, please let me know. I will add it. thank you.
For the first error, the subgraph hand_landmark_model_loader.pbtxt is not able to read the model file "hand_landmark_lite.tflite" (or maybe "hand_landmark_full.tflite"). The error is reported by "android/file/base/helpers.cc" after successfully opening the requested file, but then failing to read the contents from the opened file descriptor. This looks like some sort of race between file reads and writes on Android. Maybe the model file could be left in some kind of busy state after a previous run has successfully read the model file. I'd be curious if this failure only happens when the application is run in succession, or if it can occur on the "first" run of the application.
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.
Closing as stale. Please reopen if you'd like to work on this further.
Error happens about 1 in 10 times.
E/FrameProcessor: Mediapipe error: com.google.mediapipe.framework.MediaPipeException: unknown: Graph has errors: Calculator::Open() for node "holisticlandmarkcpu__handlandmarksleftandrightcpu__handlandmarksfromposecpu_2__handlandmarkcpu__handlandmarkmodelloader__LocalFileContentsCalculator" failed: Failed to read file at com.google.mediapipe.framework.Graph.nativeMovePacketToInputStream(Native Method) at com.google.mediapipe.framework.Graph.addConsumablePacketToInputStream(Graph.java:407) at com.google.mediapipe.components.FrameProcessor.onNewFrame(FrameProcessor.java:458) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.renderNext(ExternalTextureConverter.java:485) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.lambda$onFrameAvailable$0$com-google-mediapipe-components-ExternalTextureConverter$RenderThread(ExternalTextureConverter.java:413) at com.google.mediapipe.components.ExternalTextureConverter$RenderThread$$ExternalSyntheticLambda0.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:966) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:293) at com.google.mediapipe.glutil.GlThread.run(GlThread.java:141)