Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
React Starter Kit | 21,922 | 1 | 5 | 5 days ago | 23 | March 07, 2016 | 5 | mit | TypeScript | |
The web's most popular Jamstack front-end template (boilerplate) for building web applications with React | ||||||||||
Quickstart Android | 8,477 | a day ago | 41 | apache-2.0 | Java | |||||
Firebase Quickstart Samples for Android | ||||||||||
React Most Wanted | 2,386 | 4 | 7 days ago | 97 | August 31, 2022 | 9 | mit | JavaScript | ||
React starter kit with "Most Wanted" application features | ||||||||||
React Native Starter | 582 | 3 years ago | 4 | mit | Ruby | |||||
Professional react-native starter kit with everything you'll ever need to deploy rock solid apps | ||||||||||
React Native Starter Kit | 380 | 6 months ago | 14 | mit | JavaScript | |||||
React Native Starter Kit with Firebase Auth and Facebook Login | ||||||||||
Flutter_mlkit | 322 | 11 | 3 years ago | 34 | April 13, 2020 | 38 | mit | Dart | ||
A Flutter plugin to use the Firebase ML Kit. | ||||||||||
Mlkitandroid | 193 | 5 years ago | 2 | Kotlin | ||||||
A collection of real life apps built using Firebase MLKit | ||||||||||
Firebase Startup Kit | 160 | 3 years ago | 1 | mit | JavaScript | |||||
Generator Jekyll Starter Kit | 142 | 8 months ago | 26 | January 09, 2021 | 1 | isc | JavaScript | |||
🚀 Jekyll Progressive Web App Generator. | ||||||||||
Push Notifications Firebase Swift | 117 | 7 months ago | 3 | Swift | ||||||
Push Notifications with Firebase in Swift 5 - Starter Kit (Google Cloud Messaging) |
A Flutter plugin to use the Firebase ML Kit.
⭐️Only your star motivate me!⭐️
The flutter team now has the firebase_ml_vision or firebase_ml_custom package for Firebase ML Kit. Please consider trying to use firebase_ml_vision.
Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!
Feature | Android | iOS |
---|---|---|
Recognize text(on device) | ✅ | ✅ |
Recognize text(cloud) | yet | yet |
Detect faces(on device) | ✅ | ✅ |
Scan barcodes(on device) | ✅ | ✅ |
Label Images(on device) | ✅ | ✅ |
Label Images(cloud) | yet | yet |
Object detection & tracking | yet | yet |
Recognize landmarks(cloud) | yet | yet |
Language identification | ✅ | ✅ |
Translation | yet | yet |
Smart Reply | yet | yet |
AutoML model inference | yet | yet |
Custom model(on device) | ✅ | ✅ |
Custom model(cloud) | ✅ | ✅ |
What features are available on device or in the cloud?
To use this plugin, add mlkit
as a dependency in your pubspec.yaml file.
Check out the example
directory for a sample app using Firebase Cloud Messaging.
To integrate your plugin into the Android part of your app, follow these steps:
google-services.json
file and place it inside android/app
. Next, modify the android/build.gradle
file and the android/app/build.gradle
file to add the Google services plugin as described by the Firebase assistant.To integrate your plugin into the iOS part of your app, follow these steps:
GoogleService-Info.plist
file, open ios/Runner.xcworkspace
with Xcode, and within Xcode place the file inside ios/Runner
. Don't follow the steps named "Add Firebase SDK" and "Add initialization code" in the Firebase assistant.From your Dart code, you need to import the plugin and instantiate it:
import 'package:mlkit/mlkit.dart';
FirebaseVisionTextDetector detector = FirebaseVisionTextDetector.instance;
// Detect form file/image by path
var currentLabels = await detector.detectFromPath(_file?.path);
// Detect from binary data of a file/image
var currentLabels = await detector.detectFromBinary(_file?.readAsBytesSync());
import 'package:mlkit/mlkit.dart';
import 'package:image/image.dart' as img;
FirebaseModelInterpreter interpreter = FirebaseModelInterpreter.instance;
FirebaseModelManager manager = FirebaseModelManager.instance;
//Register Cloud Model
manager.registerRemoteModelSource(
FirebaseRemoteModelSource(modelName: "mobilenet_v1_224_quant"));
//Register Local Backup
manager.registerLocalModelSource(FirebaseLocalModelSource(modelName: 'mobilenet_v1_224_quant', assetFilePath: 'ml/mobilenet_v1_224_quant.tflite');
var imageBytes = (await rootBundle.load("assets/mountain.jpg")).buffer;
img.Image image = img.decodeJpg(imageBytes.asUint8List());
image = img.copyResize(image, 224, 224);
//The app will download the remote model. While the remote model is being downloaded, it will use the local model.
var results = await interpreter.run(
remoteModelName: "mobilenet_v1_224_quant",
localModelName: "mobilenet_v1_224_quant",
inputOutputOptions: FirebaseModelInputOutputOptions([
FirebaseModelIOOption(FirebaseModelDataType.FLOAT32, [1, 224, 224, 3])
], [
FirebaseModelIOOption(FirebaseModelDataType.FLOAT32, [1, 1001])
]),
inputBytes: imageToByteList(image));
// int model
Uint8List imageToByteList(img.Image image) {
var _inputSize = 224;
var convertedBytes = new Uint8List(1 * _inputSize * _inputSize * 3);
var buffer = new ByteData.view(convertedBytes.buffer);
int pixelIndex = 0;
for (var i = 0; i < _inputSize; i++) {
for (var j = 0; j < _inputSize; j++) {
var pixel = image.getPixel(i, j);
buffer.setUint8(pixelIndex, (pixel >> 16) & 0xFF);
pixelIndex++;
buffer.setUint8(pixelIndex, (pixel >> 8) & 0xFF);
pixelIndex++;
buffer.setUint8(pixelIndex, (pixel) & 0xFF);
pixelIndex++;
}
}
return convertedBytes;
}
// float model
Uint8List imageToByteList(img.Image image) {
var _inputSize = 224;
var convertedBytes = Float32List(1 * _inputSize * _inputSize * 3);
var buffer = Float32List.view(convertedBytes.buffer);
int pixelIndex = 0;
for (var i = 0; i < _inputSize; i++) {
for (var j = 0; j < _inputSize; j++) {
var pixel = image.getPixel(i, j);
buffer[pixelIndex] = ((pixel >> 16) & 0xFF) / 255;
pixelIndex += 1;
buffer[pixelIndex] = ((pixel >> 8) & 0xFF) / 255;
pixelIndex += 1;
buffer[pixelIndex] = ((pixel) & 0xFF) / 255;
pixelIndex += 1;
}
}
return convertedBytes.buffer.asUint8List();
}