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

Teachable Machine model not working on realtime #2

Open
LokieVikky opened this issue Mar 18, 2021 · 1 comment
Open

Teachable Machine model not working on realtime #2

LokieVikky opened this issue Mar 18, 2021 · 1 comment

Comments

@LokieVikky
Copy link

This is the stack trace when i tried to open realtime screen

Caused by: java.lang.IllegalArgumentException: Cannot copy from a TensorFlowLite tensor (Identity) with shape [1, 1] to a Java object with shape [1, 1, 4].
E/AndroidRuntime( 5115): at org.tensorflow.lite.Tensor.throwIfDstShapeIsIncompatible(Tensor.java:482)
E/AndroidRuntime( 5115): at org.tensorflow.lite.Tensor.copyTo(Tensor.java:252)
E/AndroidRuntime( 5115): at org.tensorflow.lite.NativeInterpreterWrapper.run(NativeInterpreterWrapper.java:175)
E/AndroidRuntime( 5115): at org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(Interpreter.java:360)
E/AndroidRuntime( 5115): at sq.flutter.tflite.TflitePlugin$RunSSDMobileNet.runTflite(TflitePlugin.java:651)
E/AndroidRuntime( 5115): at sq.flutter.tflite.TflitePlugin$TfliteTask.doInBackground(TflitePlugin.java:448)
E/AndroidRuntime( 5115): at sq.flutter.tflite.TflitePlugin$TfliteTask.doInBackground(TflitePlugin.java:422)
E/AndroidRuntime( 5115): at android.os.AsyncTask$3.call(AsyncTask.java:394)
E/AndroidRuntime( 5115): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime( 5115): ... 4 more
I/chatty ( 5115): uid=10509(com.example.object_detection) FinalizerDaemon identical 1 line
W/System ( 5115): A resource failed to call destroy.
I/Process ( 5115): Sending signal. PID: 5115 SIG: 9

I tried floating point model from teachable machine and still the same issue persists.
I even tried my custom model in your sample project and got the same error
Im using Tflite.detectObjectOnFrame for detection

@flomingdev
Copy link

same problem facing. it detects a black screen and responds to my navigation function and it leads to the crash of the app. if you found any workaround solution then please comment it out.
Thank you.

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

2 participants