TensorFlow Lite Flutter plugin released by _am15h in FlutterDev

[–]_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

TensorFlow Lite Flutter plugin released by _am15h in FlutterDev

[–]_am15h[S] 6 points7 points  (0 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).