@minding/react-native-firebase-ml
v10.8.1-patch.4
Published
React Native Firebase - Firebase ML brings the power of machine learning vision to your React Native application, supporting both Android & iOS.
Downloads
6
Readme
Firebase Machine Learning is a mobile SDK that brings Google's machine learning expertise to Android and iOS apps in a powerful yet easy-to-use package. Whether you're new or experienced in machine learning, you can implement the functionality you need in just a few lines of code. There's no need to have deep knowledge of neural networks or model optimization to get started. On the other hand, if you are an experienced ML developer, Firebase ML provides convenient APIs that help you use your custom TensorFlow Lite models in your mobile apps.
Cloud vs. on-device
Firebase ML has APIs that work either in the in the cloud or on the device. When we describe an ML API as being a cloud API or on-device API, we are describing which machine performs inference: that is, which machine uses the ML model to discover insights about the data you provide it. In Firebase ML, this happens either on Google Cloud, or on your users' mobile devices.
The text recognition, image labeling, and landmark recognition APIs perform inference in the cloud. These models have more computational power and memory available to them than a comparable on-device model, and as a result, can perform inference with greater accuracy and precision than an on-device model. On the other hand, every request to these APIs requires a network round-trip, which makes them unsuitable for real-time and low-latency applications such as video processing.
The custom model APIs and AutoML Vision Edge deal with ML models that run on the device. The models used and produced by these features are TensorFlow Lite models, which are optimized to run on mobile devices. The biggest advantage to these models is that they don't require a network connection and can run very quickly—fast enough, for example, to process frames of video in real time.
Firebase ML provides two key capabilities around on-device custom models:
Custom model deployment: Deploy custom models to your users' devices by uploading them to our servers. Your Firebase-enabled app will download the model to the device on demand. This allows you to keep your app's initial install size small, and you can swap the ML model without having to republish your app.
AutoML Vision Edge: This service helps you create your own on-device custom image classification models with an easy-to-use web interface. Then, you can seamlessly host the models you create with the service mentioned above.
ML Kit: Ready-to-use on-device models
On June 3, 2020, Google started offering ML Kit's on-device APIs through a new standalone SDK. Cloud APIs, AutoML Vision Edge, and custom model deployment will continue to be available through Firebase Machine Learning.
If you're looking for pre-trained models that run on the device, check out the new standalone ML Kit. Use the new react-native-mlkit modules) for most on-device use cases:
- Text recognition
- Image labeling
- Object detection and tracking
- Face detection and contour tracing
- Barcode scanning
- Language identification
- Translation
- Smart Reply
This react-native-firebase module currently supports the following Firebase ML APIs:
| API | Supported | | -------------------------------------------------------------------------------- | --------- | | Text Recognition | ✅ | | Document Text Recognition) | ✅ | | Image Labeling | ✅ | | Landmark Recognition | ✅ | | AutoML Vision Edge | ❌ | | Custom Models | ❌ |
Installation
Requires @react-native-firebase/app
to be installed.
yarn add @react-native-firebase/ml
Documentation
Additional Topics
License
- See LICENSE