-
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
MediaPipe Object Detection crashes on Android emulators if API > 30 #5134
Comments
The medipipe/examples/objectdetection app also crashes when run on an emulator with API > 30. It seems that x86 images are OK, but x86_64 images are not. Then this app crashes because libmediapipe_tasks_vision_jni.so cannot be found. |
It appears to be similar to the issue #5100, which has already been reported and is causing crashes on Android emulators. Could you please investigate this issue as well? Thank you!!! |
I downloaded your sample program medipipe/examples/objectdetection and made only two small changes, to app build.gradle:
|
If I look at the APK file, both debug and release, there is a libmediapipe_tasks_vision_jni.so for x86, arm64-v8a, and arme-abiv7a, but not for x86_64. Have you for some reason not compiled MediaPipe for this architecture?? This bug stops me from releasing my new app since I cannot test it properly. I would be grateful if you fix this asap. |
f I look at the APK file, both debug and release, there is a
libmediapipe_tasks_vision_jni.so for x86, arm64-v8a, and arme-abiv7a, **but
not for x86_64**. Have you for some reason not compiled MediaPipe for this
architecture??
This bug stops me from releasing my new app since I cannot test it
properly. I would be grateful if you fix this asap.
Den mån 12 feb. 2024 kl 09:36 skrev kuaashish ***@***.***>:
… Hi @schmidt-sebastian <https://github.com/schmidt-sebastian>,
It appears to be similar to the issue #5100
<#5100>, which has already been
reported and is causing crashes on Android emulators. Could you please
investigate this issue as well?
Thank you!!!
—
Reply to this email directly, view it on GitHub
<#5134 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEN5JJLXELYQBNRYKM46OOTYTHIBJAVCNFSM6AAAAABDC2CDX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGIZTKOBUGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@schmidt-sebastian When can you look at this? |
Hi @BoHellgren, We have identified that using an emulator to run this program might not be ideal due to hardware limitations and the program's reliance on specific hardware features for optimal performance. Using a physical device is highly recommended for the best experience and functionality. Because, Machine learning programs often require direct interaction with real-world hardware resources to function effectively. Emulators, while valuable for development and testing, may not provide the necessary hardware capabilities for this program to run smoothly. Unfortunately, due to limitations, We can not do much about this issue. Thank you!! |
I agree that testing ML apps in an emulator has its problems. For example, to test your Object Detection sample program, one has to use Extended Controls to mount an image on a wall in the emulated apartment, and then use mouse and QWERASDF keys to move the emulated camera to face the wall with the photo. This does not mean that testing on emulators is useless. On the contrary, unless you have a lot of physical devices, emulators are the only way to test that your app runs on all API levels. Testing on Firebase Test Lab is not an alternative for ML apps, since you then don't have any control of the camera whatsoever. I am convinced that you can make MediaPipe run on emulators if you want to, and I urge you to fix this. I think many developers will say no thanks to MediaPipe if they hear that you only support testing on real devices. |
@kuaashish It would crash on a real hardware x64 device. This crash is not due emulator limitations, this is due the missing jni library, lol. Have you even read the issue, or did you just generated your response using ChatGPT? |
Could you please have look into this issue? Thank you!! |
Did anyone find any solution to this problem ? I have tried hand gesture example on s23 ultra running on android 14 and I get the same error basically any device having SDK > 30 gives same error i.e jni file not found. |
@kuaashish @schmidt-sebastian Additionally, the absence of libmediapipe_tasks_vision_jni.so for x86_64 can result in rejection when publishing to the Google Play Store. What solutions do you suggest for this issue? |
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
Yes
OS Platform and Distribution
Android 11, 12, 13
Mobile device if the issue happens on mobile device
Emulated Pixel 5
Browser and version if the issue happens on browser
No response
Programming Language and version
Kotlin
MediaPipe version
implementation 'com.google.mediapipe:tasks-vision:latest.release'
Bazel version
No response
Solution
Object Detection
Android Studio, NDK, SDK versions (if issue is related to building in Android environment)
No response
Xcode & Tulsi version (if issue is related to building for iOS)
No response
Describe the actual behavior
Fatal exception if API level > 30
Describe the expected behaviour
To work as it does on API level 30
Standalone code/steps you may have used to try to get what you need
Other info / Complete Logs
My app works on a real Samsung Galaxy S10e, an emulated Pixel 5 API 30 and an emulated Nexus 5 API 30. But it crashes on Pixel 5 API 31 and Nexus 5 API 33 with the message dlopen failed: library "libmediapipe_tasks_vision_jni.so" not found
The text was updated successfully, but these errors were encountered: