-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Find path of model.tflite on Android. #582
Comments
Use this function: https://github.com/google/mediapipe/blob/1722d4b8a25ad7c919576f9b1bab4ffa7a9299bc/mediapipe/calculators/tflite/tflite_inference_calculator.cc#L594 |
You can use that function inside the calculator or you could try to get the path in Java. Where are you trying to get the path from? |
I haven't pushed the changes yet, but I used the function and was able to get the path to the model. I also added it to the BUILD file in android/src/.../hand-gesture-recongition , handtrackinggpu, and hand detectiongpu under the android library shown below android_library( However, my app now works for around 10 seconds or 20 seconds and then crashes. Is there any reason why? |
Can you share an |
It says something about Fatal signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x7591237060 in tid 5944 (Thread-5), pid 5867 (handtrackinggpu) 04-07 18:19:26.378 5867 5946 I native : I0407 18:19:26.378847 5946 resource_util_android.cc:53] Successfully loaded: model.tflite |
Also, I narrowed down my problem to tflite interpreter --> Invoke() Somehow it is crashing when it reaches this statement. I'm not exactly sure how to fix it as I thought the statement should take care of it. (It is crashing before reaching any of the statement inside the if statement so it must be interpreter -> Invoke() that is causing the error) |
Can you confirm if the model runs at least once? |
Yup! It is able to run for abut 30 seconds. But somehow it still segfaults after that much time. I have also pushed everything to my github and you can now see the changes I made. The model.tflite is called here: |
Hi, apologies for the delayed response. Are you still running into this issue? |
I have added my model.tflite in this folder https://github.com/sne21star/mediapipe/tree/master/hand-gesture-recognition.
And I need to to get the path of the model not from my directory because when I downloaded the app to my android the model is not in that exact directory. How do i get the path to model.tflite so that it can open it on an android?
The text was updated successfully, but these errors were encountered: