I was trying to run a tflite
model I created from teachable machine on an image using I picked using image_picker
,
I'm using (flutter_tflite)[https://pub.dev/packages/flutter_tflite] package.
app keeps crashes whenever I try to run model on image.
here's my code,
await Tflite.loadModel(
model: 'assets/model_unquant.tflite',
labels: 'assets/labels.txt',
numThreads: 1,
isAsset: true,
useGpuDelegate: false
);
XFile? pickedFile = await ImagePicker().pickImage(source: ImageSource.camera);
if (pickedFile != null) {
File image = File(pickedFile.path);
Tflite.runModelOnImage(path: pickedFile.path,);
}
and this is what I get on console after running model,
D/MediaScannerConnection(27500): Scanned /data/user/0/com.example.ml_sample_using_flutter_tflite/cache/c1ba6faa-130c-4909-9873-01bb0a4b80ef6021674944805785742.jpg to null
E/SurfaceSyncer(27500): Failed to find sync for id=0
E/SurfaceSyncer(27500): Failed to find sync for id=1
E/SurfaceSyncer(27500): Failed to find sync for id=2
I/InterpreterApi(27500): Loaded native library: tensorflowlite_jni
I/InterpreterApi(27500): Didnt load native library: tensorflowlite_jni_gms_client
I/tflite (27500): Initialized TensorFlow Lite runtime.
W/libc (27500): Access denied finding property "ro.mediatek.platform"
W/libc (27500): Access denied finding property "ro.chipname"
W/libc (27500): Access denied finding property "ro.hardware.chipname"
I/tflite (27500): Created TensorFlow Lite XNNPACK delegate for CPU.
I/tflite (27500): Replacing 71 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions.
V/time (27500): Inference took 245
I have tried, running both quantized and float32 models.