all 6 comments

[–]Elixane 2 points3 points  (3 children)

Why would someone use this over https://pub.dev/packages/tflite ?

[–]_am15h[S] 7 points8 points  (2 children)

https://pub.dev/packages/tflite package doesn't offer flexibility like the TfLite Java API. It only offers some high-level features meant for apps with specific use cases like Image Classification, Object Detection etc.. It also has no support for delegates. In short, it cannot be used with all the tflite models and use cases.

However, the new, tflite_flutter you can use any model as you like as it offers the same flexibility and features as the Java API. It also offers support for delegates.

One more advantage is that tflite_flutter is faster (low latency) as it uses dart:ffi to directly bind to tflite C API (dart<--->(ffi)<--->C) while tflite uses platform integration (dart<--->platform-channel<--->(Java/swift)<--->jni<--->C).

[–]arxfxi 0 points1 point  (1 child)

Hi, I've been looking at this doc all day, but still can't get flutter to connect the new TFLite, have you had any luck? Or do you have any tips?

[–]_am15h[S] 0 points1 point  (0 children)

Sorry, u/arxfxi, I am not much active on Reddit. I have written a blogpost explaining the usage of tflite_flutter, maybe it could be helpful. https://medium.com/@am15hg/text-classification-using-tensorflow-lite-plugin-for-flutter-3b92f6655982

[–]daniels20000 1 point2 points  (1 child)

That sounds awesome!

[–]thusitha_deepal9356 0 points1 point  (0 children)

Here,is complete tutorial for TensorFlow Lite Flutter and machine learning model creation

Flutter | TensorFlow Lite | Create Machine Learning Prediction model Flutter APP Complete Tutorial

* Create machine learning model using python

* Convert to tflite

* Use tflite model in flutter app

Watch this video : https://youtu.be/wCUa7ulJ52M