npm package: @minding/react-native-firebase-ml
Description: React Native Firebase - Firebase ML brings the power of machine learning vision to your React Native application, supporting both Android & iOS.
Author: Invertase
Latest version: 10.8.1-patch.4

<p align="center">
  <a href="https://rnfirebase.io">
    <img width="160px" src="https://i.imgur.com/JIyBtKW.png"><br/>
  </a>
  <h2 align="center">React Native Firebase - ML</h2>
</p>

<p align="center">
  <a href="https://api.rnfirebase.io/coverage/ml/detail"><img src="https://api.rnfirebase.io/coverage/ml/badge?style=flat-square" alt="Coverage"></a>
  <a href="https://www.npmjs.com/package/@react-native-firebase/ml"><img src="https://img.shields.io/npm/dm/@react-native-firebase/ml.svg?style=flat-square" alt="NPM downloads"></a>
  <a href="https://www.npmjs.com/package/@react-native-firebase/ml"><img src="https://img.shields.io/npm/v/@react-native-firebase/ml.svg?style=flat-square" alt="NPM version"></a>
  <a href="/LICENSE"><img src="https://img.shields.io/npm/l/react-native-firebase.svg?style=flat-square" alt="License"></a>
  <a href="https://lerna.js.org/"><img src="https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=flat-square" alt="Maintained with Lerna"></a>
</p>

<p align="center">
  <a href="https://invertase.link/discord"><img src="https://img.shields.io/discord/295953187817521152.svg?style=flat-square&colorA=7289da&label=Chat%20on%20Discord" alt="Chat on Discord"></a>
  <a href="https://twitter.com/rnfirebase"><img src="https://img.shields.io/twitter/follow/rnfirebase.svg?style=flat-square&colorA=1da1f2&colorB=&label=Follow%20on%20Twitter" alt="Follow on Twitter"></a>
  <a href="https://www.facebook.com/groups/rnfirebase"><img src="https://img.shields.io/badge/Follow%20on%20Facebook-4172B8?logo=facebook&style=flat-square&logoColor=fff" alt="Follow on Facebook"></a>
</p>

---

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](https://developers.google.com/ml-kit). 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](https://developers.google.com/ml-kit). Use the new [react-native-mlkit modules](https://www.npmjs.com/org/react-native-mlkit)) 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](https://firebase.google.com/docs/ml/recognize-text)           | ✅        |
| [Document Text Recognition](https://firebase.google.com/docs/ml/recognize-text)) | ✅        |
| [Image Labeling](https://firebase.google.com/docs/ml/label-images)               | ✅        |
| [Landmark Recognition](https://firebase.google.com/docs/ml/recognize-landmarks)  | ✅        |
| [AutoML Vision Edge](https://firebase.google.com/docs/ml/automl-image-labeling)  | ❌        |
| [Custom Models](https://firebase.google.com/docs/ml/use-custom-models)           | ❌        |

[> Learn More](https://firebase.google.com/docs/ml)

## Installation

Requires `@react-native-firebase/app` to be installed.

```bash
yarn add @react-native-firebase/ml
```

## Documentation

- [Quick Start](https://rnfirebase.io/ml/usage)
- [Reference](https://rnfirebase.io/reference/ml)

### Additional Topics

- [Text Recognition](https://rnfirebase.io/ml/text-recognition)
- [Landmark Recognition](https://rnfirebase.io/ml/landmark-recognition)
- [Image Labeling](https://rnfirebase.io/ml/image-labeling)

## License

- See [LICENSE](/LICENSE)

---

<p>
  <img align="left" width="75px" src="https://static.invertase.io/assets/invertase-logo-small.png">
  <p align="left">
    Built and maintained with 💛 by <a href="https://invertase.io">Invertase</a>.
  </p>
</p>

---