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

Manage TFlite and MediaPipe for different ABIs #3

Open
VishV-Android opened this issue May 20, 2024 · 10 comments
Open

Manage TFlite and MediaPipe for different ABIs #3

VishV-Android opened this issue May 20, 2024 · 10 comments

Comments

@VishV-Android
Copy link

I am creating an android app using TensorFlow and MediaPipe for Object Detection. But in some devices, I am getting ABIs crashes for some devices in the firebase and this problem I am facing after the release the app.
Could you pls help to resolve this issue?
Thanks in advance.

@shubham0204
Copy link
Owner

TFLite and Mediapipe APIs are compiled for four ABI platforms, armeabi-v7a, arm64-v8a, x86 and x86-64 which cover most Android devices. Could you tell specifically, on which ABIs is the app crashing?

@VishV-Android
Copy link
Author

@shubham0204 I am getting crashes issues in the app production.

I am asking about is it necessary to use these abiFilters for supports 32-bit processor?

ndk { abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64' ,'x86' }

check this and also you can check the stackTrace as well at the bottom.

Screenshot 2024-05-20 175114

@shubham0204
Copy link
Owner

MLKit and TFLite docs do not suggest adding abiFilters to build.gradle, but there's no harm in adding them.
Without adding them, Android / PlayStore assumes that the app is built for all four ABIs. If this is not the case with the app, users may face crashes as the native code will not be supported on their device. Hence, it would be great to add abiFilters to give the right directions to the Android OS and PlayStore

@VishV-Android
Copy link
Author

I have added abiFilters but still getting error of not found native code. How to manage this?
And if user face crashes then how to handle it?

@shubham0204
Copy link
Owner

Can you share the entire log trace here (of the native-code not found error)?

@VishV-Android
Copy link
Author

Here is the screenshot of play Console log trace.

Screenshot 2024-05-21 172333

@VishV-Android
Copy link
Author

@shubham0204 did you checked this issue?

@shubham0204
Copy link
Owner

I am still not able to understand the cause of the issue
The best we can try is to update the TensorFlow dependencies if they're not the latest ones

@VishV-Android
Copy link
Author

Whenever you figured out this issue Kindly let me know.
In addition, I have used latest TensorFlow dependencies for my project.

@shubham0204
Copy link
Owner

@VishV-Android Which Mediapipe Task library are you using for object detection? Do let me know its version and artifact ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants