Stay organized with collections
Save and categorize content based on your preferences.
Firebase Machine Learning
plat_iosplat_androidplat_flutter
Use machine learning in your apps to solve real-world problems.
Firebase Machine Learning is a mobile SDK that brings Google's machine
learning expertise to Android and Apple 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.
Key capabilities
Host and deploy custom models
Use your own TensorFlow Lite models for on-device inference. Just
deploy your model to Firebase, and we'll take care of hosting and
serving it to your app. Firebase will dynamically serve the latest
version of the model to your users, allowing you to regularly update
them without having to push a new version of your app to users.
When you use Firebase ML with Remote Config, you can serve different models to different user
segments, and with A/B Testing, you
can run experiments to find the best performing model (see the
Apple and
Android guides).
Production-ready for common use cases
Firebase ML comes with a set of ready-to-use APIs for common mobile
use cases: recognizing text, labeling images, and identifying landmarks.
Simply pass in data to the Firebase ML library and it gives you the
information you need. These APIs leverage the power of Google Cloud's
machine learning technology to give you the highest level of accuracy.
Cloud vs. on-device
Firebase ML has APIs that work either 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 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
the ability to 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.
ML Kit: Ready-to-use on-device models
If you're looking for pre-trained models that run on the device, check out
ML Kit. ML Kit is available
for iOS and Android, and has APIs for many use cases:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-22 UTC."],[],[],null,["Firebase Machine Learning \nplat_ios plat_android plat_flutter \nUse machine learning in your apps to solve real-world problems. \n\nFirebase Machine Learning is a mobile SDK that brings Google's machine\nlearning expertise to Android and Apple apps in a powerful yet easy-to-use\npackage. Whether you're new or experienced in machine learning, you can\nimplement the functionality you need in just a few lines of code. There's no\nneed to have deep knowledge of neural networks or model optimization to get\nstarted. On the other hand, if you are an experienced ML developer,\nFirebase ML provides convenient APIs that help you use your custom\nTensorFlow Lite models in your mobile apps.\n| This is a beta release of Firebase ML. This API might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.\n\nKey capabilities\n\n|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Host and deploy custom models | Use your own TensorFlow Lite models for on-device inference. Just deploy your model to Firebase, and we'll take care of hosting and serving it to your app. Firebase will dynamically serve the latest version of the model to your users, allowing you to regularly update them without having to push a new version of your app to users. When you use Firebase ML with [Remote Config](/docs/remote-config), you can serve different models to different user segments, and with [A/B Testing](/docs/ab-testing), you can run experiments to find the best performing model (see the [Apple](/docs/ml/ios/ab-test-models) and [Android](/docs/ml/android/ab-test-models) guides). |\n| Production-ready for common use cases | Firebase ML comes with a set of ready-to-use APIs for common mobile use cases: recognizing text, labeling images, and identifying landmarks. Simply pass in data to the Firebase ML library and it gives you the information you need. These APIs leverage the power of Google Cloud's machine learning technology to give you the highest level of accuracy. |\n\nCloud vs. on-device\n\nFirebase ML has APIs that work either in the cloud or on the device.\nWhen we describe an ML API as being a cloud API or on-device API, we are\ndescribing *which machine performs inference* : that is, which machine uses the\nML model to discover insights about the data you provide it. In Firebase ML,\nthis happens either on Google Cloud, or on your users' mobile devices.\n\nThe text recognition, image labeling, and landmark recognition APIs perform\ninference in the cloud. These models have more computational power and memory\navailable to them than a comparable on-device model, and as a result, can\nperform inference with greater accuracy and precision than an on-device model.\nOn the other hand, every request to these APIs requires a network round-trip,\nwhich makes them unsuitable for real-time and low-latency applications such as\nvideo processing.\n\nThe custom model APIs deal with ML models that run on the\ndevice. The models used and produced by these features are\n[TensorFlow Lite](https://tensorflow.org/lite) models, which are\noptimized to run on mobile devices. The biggest advantage to these models is\nthat they don't require a network connection and can run very quickly---fast\nenough, for example, to process frames of video in real time.\n\nFirebase ML provides\nthe ability to deploy custom models to your users' devices by\nuploading them to our servers. Your Firebase-enabled app will download the\nmodel to the device on demand. This allows you to keep your app's initial\ninstall size small, and you can swap the ML model without having to republish\nyour app.\n\nML Kit: Ready-to-use on-device models On June 3, 2020, we started offering ML Kit's on-device APIs through a\n| [new\n| standalone SDK](https://developers.google.com/ml-kit).\n| Google Cloud APIs and custom model deployment will\n| continue to be available through Firebase Machine Learning.\n\nIf you're looking for pre-trained models that run on the device, check out\n[ML Kit](https://developers.google.com/ml-kit). ML Kit is available\nfor iOS and Android, and has APIs for many use cases:\n\n- Text recognition\n- Image labeling\n- Object detection and tracking\n- Face detection and contour tracing\n- Barcode scanning\n- Language identification\n- Translation\n- Smart Reply\n\nNext steps\n\n- Explore the ready-to-use APIs: [text recognition](/docs/ml/recognize-text), [image labeling](/docs/ml/label-images), and [landmark recognition](/docs/ml/recognize-landmarks).\n- Learn about using mobile-optimized [custom models](/docs/ml/use-custom-models) in your app."]]