flutter_tflite icon indicating copy to clipboard operation
flutter_tflite copied to clipboard

A resource failed to call close/destory after loadModel

Open BoHellgren opened this issue 5 years ago • 5 comments

The following code String loadSuccess = await Tflite.loadModel( model: "assets/ssd_mobilenet.tflite", labels: "assets/ssd_mobilenet.txt"); causes warning messages W/System (31431): A resource failed to call close. W/System (31431): A resource failed to call destroy. W/System (31431): A resource failed to call destroy. W/System (31431): A resource failed to call destroy.

In my app there is a startImageStream callback which does loadModel mobilnet Tflite.detectObjectOnFrame loadModel own model Tflite.runModelOnFrame

I works, but I get around 200 warning messages per minute (in debug mode). Is there a way to avoid this?

I wish I could load both models outside the imagestream, but that is not possible the way the plugin is designed, right?

BoHellgren avatar Dec 16 '19 17:12 BoHellgren

Seeing the same thing. Only seems to be happening on android.

philiplindberg avatar Apr 10 '20 11:04 philiplindberg

I am running a real time demo and the predictions seem to continue even when the app is in background ?

AbdulRashidReshamwala avatar Apr 20 '20 11:04 AbdulRashidReshamwala

have you solved this problem? @BoHellgren @philiplindberg @AbdulRashidReshamwala

chaoyifei avatar Apr 09 '24 13:04 chaoyifei

I am using MediaPipe instead. See https://levelup.gitconnected.com/flutter-camerax-and-mediapipe-13c33ca95f8d

BoHellgren avatar Apr 09 '24 15:04 BoHellgren

I am using MediaPipe instead. See https://levelup.gitconnected.com/flutter-camerax-and-mediapipe-13c33ca95f8d

waht about ios?

chaoyifei avatar Apr 09 '24 23:04 chaoyifei