mediapipe
mediapipe copied to clipboard
Face Dectection(Mediapipe) crash on latest version of android devices(14) on line FaceDetector.createFromOptions(context, options).
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
windows 11
Mobile device if the issue happens on mobile device
s23 ultra
Browser and version if the issue happens on browser
No response
Programming Language and version
kotlin
MediaPipe version
0.20230731
Bazel version
No response
Solution
Need solution
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
App crashes when activity start and start compile FaceDetector.createFromOptions this line of code
Describe the expected behaviour
As like all other devices perform well i expect this for arm64-v8a devices too
Standalone code/steps you may have used to try to get what you need
private fun setupFaceDetector() {
// if(System.getProperty("os.arch")?.equals("x86_64") == true) return
val baseOptionsBuilder = BaseOptions.builder()
baseOptionsBuilder.setModelAssetPath("face_detection_short_range.tflite")
val baseOptions = baseOptionsBuilder.build()
try {
val optionsBuilder =
FaceDetector.FaceDetectorOptions.builder()
.setBaseOptions(baseOptions)
.setMinDetectionConfidence(THRESHOLD_DEFAULT)
.setRunningMode(RunningMode.IMAGE)
val options = optionsBuilder.build()
faceDetector = FaceDetector.createFromOptions(context, options)
} catch (e: Exception) {
Log.e(TAG, "TFLite failed to load model with error: " + e.message)
}
}
Other info / Complete Logs
i test on samsung codelab and device name is s23Ultra
Do you have any logs for us? Does this crash only occur on the latest version of MediaPipe?
There is also https://github.com/google/mediapipe/issues/5039, I wonder if you are hitting the same issue.
yes this issue occurs on latest version of MediaPipe. I test my app on samsung remote lab test device so log list is very long and i am unable get the exact log.
Hello.
I had the same issue with an Android S23 but managed to resolve it by using the latest version of Mediapipe (0.10.10)!
Yes i resolved it by using this version. Thanks