A temporary note on machine vision with ML Kit and Flutter
-
Firebase ML Kit is deprecated (https://developers.google.com/ml-kit/migration). All 3rd-party published tutorials I could find on September 6, 2020 are referring to the deprecated APIs.
-
As of June 3, 2020 the new products / APIs are ML Kit (https://developers.google.com/ml-kit) and Firebase Machine Learning aka Firebase ML, in beta (https://firebase.google.com/products/ml).
-
Flutter (https://flutter.dev/) features a plugin from the Firebase team named
firebase_ml_vision
, described as "A Flutter plugin to use the capabilities of Firebase ML, which includes all of Firebase's cloud-based ML features, and ML Kit, a standalone library for on-device ML, which can be used with or without Firebase" (https://pub.dev/packages/firebase_ml_vision). Thus the plugin is supposed to cover both ML Kit (which can be used without Firebase) and Firebase ML. Its name therefore could lead to confusion. -
As of September 6, 2020, the plugin, however, does not work with the new ML Kit. Also the instructions describe the deprecated Firebase ML Kit (firebase/flutterfire#3473).
-
To use any pretrained ML Kit on-device (bundled or download via Play Services) model such as Face Detection with ML Kit, one should be able to use the plugin without setting up a Firebase project. This example for the native Android version of ML Kit shows how: https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart.
-
Things seem to be in heavy flow at Google. It certainly has a "20 product managers in a room with a knife" vibe. Or there is just confusion about how to deal with the machine learning part / ML Kit. For more context read: https://medium.com/flutter/updates-on-flutter-and-firebase-8076f70bc90e, look at the table here: https://firebase.flutter.dev/ and the documentation here: https://firebase.flutter.dev/docs/overview. What would Sherlock Holmes do?
-
I will therefore update this note until it itself is deprecated.