-
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
object detection on android with gpu will crash when set setCategoryAllowlist #5614
Comments
Hi @hugski, Could you please try using List instead of mutableListOf, as both should behave similarly, but we would like to test this approach just in case it resolves the issue? Also, when using the CPU as the delegate, could you provide an update on the status? Thank you!! |
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you. |
val baseOptions = BaseOptions.builder()
.setDelegate(Delegate.GPU)
.setModelAssetPath("detect/efficientdet-lite0.tflite")
.build()
val options = ObjectDetector.ObjectDetectorOptions.builder()
.setBaseOptions(baseOptions)
.setCategoryAllowlist(listOf("person")) the error message is
val baseOptions = BaseOptions.builder()
.setDelegate(Delegate.CPU)
.setModelAssetPath("detect/efficientdet-lite0.tflite")
.build()
val options = ObjectDetector.ObjectDetectorOptions.builder()
.setBaseOptions(baseOptions)
.setCategoryAllowlist(listOf("person")) |
Hi @hugski, Apologies for the delayed response. Could you please update to Android 14, as it supports API level 34, which is required in MediaPipe version 0.10.15. You can find more details in our release notes here under Android section 'Bump targetSdkVersion to 34 throughout MediaPipe.' Additionally, please try the latest version (0.10.15) and let us know if the issue persists. Thank you!! |
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you. |
This issue was closed due to lack of activity after being marked stale for past 7 days. |
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
android 13
Mobile device if the issue happens on mobile device
xiaomi pad 6 pro
Browser and version if the issue happens on browser
No response
Programming Language and version
kotlin java
MediaPipe version
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
eg. setCategoryAllowlist("person") will crash and error message is "Check failed: class_index_set_.values.size() == IsClassIndexAllowed(0) ? num_classes_ : num_classes_ - 1 (1 vs. 90) Only all classes >= class 0 or >= class 1"
Describe the expected behaviour
setCategoryAllowlist("person") and the result only contain person categories
Standalone code/steps you may have used to try to get what you need
Other info / Complete Logs
No response
The text was updated successfully, but these errors were encountered: