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

Model Loading Error for Image Embedder in Android #972

Open
samyabose opened this issue May 6, 2024 · 0 comments
Open

Model Loading Error for Image Embedder in Android #972

samyabose opened this issue May 6, 2024 · 0 comments

Comments

@samyabose
Copy link

I was trying to add the Image Embedder in the Task Vision Java API for Android. But I have come across an error which is preventing me from loading any model.

Error:

java.lang.IllegalStateException: Error getting native address of native library: task_vision_jni
at org.tensorflow.lite.task.core.TaskJniUtils.createHandleFromLibrary(TaskJniUtils.java:95)
at org.tensorflow.lite.task.vision.embedder.ImageEmbedder.createFromBufferAndOptions(ImageEmbedder.java:203)
at org.tensorflow.lite.task.vision.embedder.ImageEmbedder.createFromBuffer(ImageEmbedder.java:116)
at intangles.videotelematics.invision_tflite_objectdetection.MainActivity.onCreate(MainActivity.java:210)
at android.app.Activity.performCreate(Activity.java:7894)
at android.app.Activity.performCreate(Activity.java:7881)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3283)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3457)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7560)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.IllegalArgumentException: Error occurred when initializing ImageEmbedder: ExternalFile must specify at least one of 'file_content', 'file_name' or 'file_descriptor_meta'.
at org.tensorflow.lite.task.vision.embedder.ImageEmbedder.initJniWithByteBuffer(Native Method)
at org.tensorflow.lite.task.vision.embedder.ImageEmbedder.access$100(ImageEmbedder.java:72)
at org.tensorflow.lite.task.vision.embedder.ImageEmbedder$3.createHandle(ImageEmbedder.java:207)
at org.tensorflow.lite.task.core.TaskJniUtils.createHandleFromLibrary(TaskJniUtils.java:91)

Checkout my PR: https://github.com/tensorflow/tflite-support/compare/master...samyabose:tflite-support:r0.4.5?expand=1

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

1 participant