Closed gr4cza closed 2 years ago
Hi @gr4cza, Can you try verifying the above with this build https://google.github.io/mediapipe/solutions/box_tracking.html#mobile and if you still see the error, Please share the device details.
Hi @sgowroji, thank you for your quick reply! I tried the prebuilt apk, and I tried it to bulid and install it with the commands:
bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/objecttrackinggpu:objecttrackinggpu
adb install bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/objecttrackinggpu/objecttrackinggpu.apk
And that way it is working fine.
But I need a way to modify this, to be able to build it in my application, and that's why I need the AAR. I even tried to extract and replace the libopencv_java3.so
and libmediapipe_jni.so
files in the aar from the apk, but it still shows the above error.
I use a OnePlus 5T as a device.
Hi @yegenzhi ! I pushed the modified MediaPipe face detection aar example to my github here, to be more easily reproducible.
I was able to find the problem, i forgot (and I didn't know I have) to copy the labelmap.txt
to the assests/
. Now it is working fine!
Please make sure that this is a solution issue.
System information (Please provide as much relevant information as possible)
Describe the expected behavior:
I want to create an object tracking Android application using Mediapipe, and I need the data from the recognition (object id, object type, bounding box...)
Standalone code you may have used to try to get what you need :
Based on the MediaPipe Android Archibe documentation, I created a BUILD file in
mediapipe/examples/android/src/java/com/google/mediapipe/apps/object_tracking_aar/BUILD
with the content of:Than I run this command to generate the aar file:
Also, I generated the needed
.binarypb
file by runing:I tried to modify @jiuqiant MediaPipe face detection aar example by changing the
mediapipe_face_detection.aar
to the newly generated aar file, and also added themobile_gpu.binarypb
andssdlite_object_detection.tflite
files to the assets.If I run it on my mobile, it exits after a short black screen.
If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/repo link /any notebook: Github
Other info / Complete Logs : Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached: