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

Custom tflite model not working #16

Open
EshwarMuthu opened this issue Oct 20, 2019 · 1 comment
Open

Custom tflite model not working #16

EshwarMuthu opened this issue Oct 20, 2019 · 1 comment

Comments

@EshwarMuthu
Copy link

Hi @shaqian, I am trying to build a yoga pose detector application. I have got the tflite model from https://github.com/smellslikeml/YogAI. Model name is model.tflite. I inserted the model in assests folder and added it in pubspec.yaml and also I have changed my model path in loadModel function in home.dart file. I called the runModelOnFrame function in camera.dart file. But I am getting error. Can u please help me with this. This is the error I got:
E/AndroidRuntime( 4091): FATAL EXCEPTION: AsyncTask #2
E/AndroidRuntime( 4091): Process: com.example.ai_project, PID: 4091
E/AndroidRuntime( 4091): java.lang.RuntimeException: An error occurred while executing doInBackground()
E/AndroidRuntime( 4091): at android.os.AsyncTask$3.done(AsyncTask.java:354)
E/AndroidRuntime( 4091): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
E/AndroidRuntime( 4091): at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
E/AndroidRuntime( 4091): at java.util.concurrent.FutureTask.run(FutureTask.java:271)
E/AndroidRuntime( 4091): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
E/AndroidRuntime( 4091): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime( 4091): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime( 4091): at java.lang.Thread.run(Thread.java:764)
E/AndroidRuntime( 4091): Caused by: java.lang.IllegalArgumentException: Null outputs are allowed only if the Tensor is bound to a buffer handle.
E/AndroidRuntime( 4091): at org.tensorflow.lite.Tensor.copyTo(Tensor.java:147)
E/AndroidRuntime( 4091): at org.tensorflow.lite.NativeInterpreterWrapper.run(NativeInterpreterWrapper.java:183)
E/AndroidRuntime( 4091): at org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(Interpreter.java:275)
E/AndroidRuntime( 4091): at org.tensorflow.lite.Interpreter.run(Interpreter.java:249)
E/AndroidRuntime( 4091): at sq.flutter.tflite.TflitePlugin$RunModelOnFrame.runTflite(TflitePlugin.java:513)
E/AndroidRuntime( 4091): at sq.flutter.tflite.TflitePlugin$TfliteTask.doInBackground(TflitePlugin.java:419)
E/AndroidRuntime( 4091): at sq.flutter.tflite.TflitePlugin$TfliteTask.doInBackground(TflitePlugin.java:393)
E/AndroidRuntime( 4091): at android.os.AsyncTask$2.call(AsyncTask.java:333)
E/AndroidRuntime( 4091): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime( 4091): ... 4 more
I/Process ( 4091): Sending signal. PID: 4091 SIG: 9
Lost connection to device.
Exited (sigterm)

@hritik7080
Copy link

I am also getting the same error with my custom weapon detection model.
@shaqian
Can you please help me with that?

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