Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Firebase Machine Learning
plat_iosplat_androidplat_flutter
Sử dụng công nghệ học máy trong các ứng dụng của bạn để giải quyết các vấn đề thực tế.
Firebase Machine Learning là một SDK di động mang chuyên môn về học máy của Google đến các ứng dụng Android và Apple trong một gói mạnh mẽ nhưng dễ sử dụng. Dù mới bắt đầu hay đã có kinh nghiệm về học máy, bạn đều có thể triển khai chức năng mình cần chỉ bằng vài dòng mã. Bạn không cần có kiến thức chuyên sâu về mạng nơ-ron hoặc tối ưu hoá mô hình để bắt đầu. Mặt khác, nếu bạn là một nhà phát triển học máy có kinh nghiệm, thì Firebase ML sẽ cung cấp các API thuận tiện giúp bạn sử dụng các mô hình TensorFlow Lite tuỳ chỉnh trong ứng dụng di động của mình.
Các chức năng chính
Lưu trữ và triển khai các mô hình tuỳ chỉnh
Sử dụng các mô hình TensorFlow Lite của riêng bạn để suy luận trên thiết bị. Bạn chỉ cần triển khai mô hình của mình lên Firebase, còn việc lưu trữ và phân phát mô hình đó cho ứng dụng của bạn sẽ do chúng tôi đảm nhiệm. Firebase sẽ tự động phân phát phiên bản mới nhất của mô hình cho người dùng, cho phép bạn thường xuyên cập nhật mô hình mà không cần phải gửi phiên bản mới của ứng dụng cho người dùng.
Khi sử dụng Firebase ML với Remote Config, bạn có thể phân phát các mô hình khác nhau cho các phân khúc người dùng khác nhau và với A/B Testing, bạn có thể chạy các thử nghiệm để tìm ra mô hình hoạt động hiệu quả nhất (xem hướng dẫn về Apple và Android).
Sẵn sàng sản xuất cho các trường hợp sử dụng phổ biến
Firebase ML đi kèm với một bộ API sẵn sàng sử dụng cho các trường hợp sử dụng phổ biến trên thiết bị di động: nhận dạng văn bản, gắn nhãn hình ảnh và xác định địa danh.
Bạn chỉ cần truyền dữ liệu vào thư viện Firebase ML và thư viện này sẽ cung cấp cho bạn thông tin cần thiết. Các API này tận dụng sức mạnh của công nghệ học máy của Google Cloud để mang đến cho bạn độ chính xác cao nhất.
Đám mây so với trên thiết bị
Firebase ML có các API hoạt động trên đám mây hoặc trên thiết bị.
Khi mô tả một API học máy là API trên đám mây hoặc API trên thiết bị, chúng tôi đang mô tả máy nào thực hiện suy luận: tức là máy nào sử dụng mô hình học máy để khám phá thông tin chi tiết về dữ liệu mà bạn cung cấp. Trong Firebase ML, điều này xảy ra trên Google Cloud hoặc trên thiết bị di động của người dùng.
Các API nhận dạng văn bản, gắn nhãn hình ảnh và nhận dạng địa danh thực hiện suy luận trên đám mây. Các mô hình này có nhiều sức mạnh tính toán và bộ nhớ hơn so với một mô hình tương đương trên thiết bị. Do đó, các mô hình này có thể thực hiện suy luận với độ chính xác cao hơn so với một mô hình trên thiết bị.
Mặt khác, mọi yêu cầu đến các API này đều cần một chuyến khứ hồi qua mạng, điều này khiến chúng không phù hợp với các ứng dụng có độ trễ thấp và theo thời gian thực, chẳng hạn như xử lý video.
Các API mô hình tuỳ chỉnh xử lý các mô hình học máy chạy trên thiết bị. Các mô hình mà những tính năng này sử dụng và tạo ra là các mô hình TensorFlow Lite, được tối ưu hoá để chạy trên thiết bị di động. Ưu điểm lớn nhất của các mô hình này là chúng không cần có kết nối mạng và có thể chạy rất nhanh – đủ nhanh để xử lý các khung hình video theo thời gian thực.
Firebase ML cho phép triển khai các mô hình tuỳ chỉnh cho thiết bị của người dùng bằng cách tải các mô hình đó lên máy chủ của chúng tôi. Ứng dụng có tích hợp Firebase sẽ tải mô hình xuống thiết bị theo yêu cầu. Điều này giúp bạn giữ kích thước cài đặt ban đầu của ứng dụng ở mức nhỏ và bạn có thể hoán đổi mô hình học máy mà không cần phải xuất bản lại ứng dụng.
Bộ công cụ học máy: Các mô hình sẵn sàng sử dụng trên thiết bị
Nếu bạn đang tìm kiếm các mô hình được huấn luyện trước chạy trên thiết bị, hãy xem Bộ công cụ học máy. ML Kit có sẵn cho iOS và Android, đồng thời có các API cho nhiều trường hợp sử dụng:
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-23 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."]]