คำแนะนำในการย้ายข้อมูล
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เมื่อวันที่ 3 มิถุนายน 2020 เราได้ทำการเปลี่ยนแปลงบางอย่างกับ ML Kit สำหรับ Firebase เพื่อแยกแยะ API ในอุปกรณ์ออกจาก API ในระบบคลาวด์ได้ดียิ่งขึ้น ตอนนี้ชุด API ปัจจุบันได้แบ่งออกเป็น 2 ผลิตภัณฑ์ดังต่อไปนี้
การเปลี่ยนแปลงครั้งนี้จะช่วยให้คุณผสานรวม ML Kit เข้ากับแอปได้ง่ายขึ้น หากต้องการใช้โซลูชันในอุปกรณ์เท่านั้น เอกสารนี้อธิบายวิธีย้ายข้อมูลแอปจาก
Firebase ML Kit SDK ไปยัง ML Kit SDK ใหม่
สิ่งที่เปลี่ยนแปลงไป
API พื้นฐานในอุปกรณ์
เราได้ย้าย API ต่อไปนี้ไปยัง ML Kit SDK แบบสแตนด์อโลนใหม่
- การสแกนบาร์โค้ด
- การตรวจจับใบหน้า
- การติดป้ายกำกับรูปภาพ
- การตรวจจับและติดตามวัตถุ
- การรู้จำข้อความ
- รหัสภาษา
- ฟีเจอร์ช่วยตอบ
- แปลภาษา
- API การอนุมาน AutoML Vision Edge
API พื้นฐานที่มีอยู่ในอุปกรณ์ใน ML Kit สำหรับ Firebase SDK เลิกใช้งานแล้วและจะไม่ได้รับการอัปเดตอีกต่อไป
หากคุณใช้ API เหล่านี้ในแอปอยู่ โปรดย้ายข้อมูลไปยัง ML Kit SDK ใหม่โดยทำตามคำแนะนำในการย้ายข้อมูล ML Kit สำหรับ Android และคำแนะนำในการย้ายข้อมูล ML Kit สำหรับ iOS
API ของโมเดลที่กำหนดเอง
สำหรับการดาวน์โหลดโมเดลที่โฮสต์ใน Firebase เครื่องมือดาวน์โหลดโมเดลที่กำหนดเองจะยังคงให้บริการผ่าน Firebase ML SDK ต่อไป SDK จะดึงข้อมูลโมเดลที่พร้อมใช้งานล่าสุดและส่งไปยังรันไทม์ของ TensorFlow Lite ที่แยกต่างหากเพื่อการอนุมาน
เราเลิกใช้งานล่ามโมเดลที่กำหนดเองที่มีอยู่แล้วใน ML Kit สำหรับ Firebase SDK และจะไม่ได้รับการอัปเดตอีก เราขอแนะนำให้ใช้รันไทม์ TensorFlow Lite
โดยตรงเพื่อการอนุมาน หรือหากต้องการใช้โมเดลที่กำหนดเองสำหรับ API การติดป้ายกำกับรูปภาพ การตรวจจับวัตถุ และติดตามออบเจ็กต์ คุณสามารถใช้โมเดลที่กำหนดเองใน API เหล่านี้ใน ML Kit ได้โดยตรง
ดูคำแนะนำโดยละเอียดในการย้ายข้อมูลสำหรับ Android และ iOS
สิ่งที่ไม่เปลี่ยนแปลง
Firebase ML จะยังให้บริการและ API ในระบบคลาวด์ต่อไป ดังนี้
คำถามที่พบบ่อย
เหตุใดจึงมีการเปลี่ยนแปลงนี้
เราทำการเปลี่ยนแปลงนี้เพื่อชี้แจงโซลูชันที่ผลิตภัณฑ์นำเสนอ
การเปลี่ยนแปลงนี้ทำให้ ML Kit SDK ใหม่มุ่งเน้นที่แมชชีนเลิร์นนิงในอุปกรณ์ได้อย่างเต็มที่ ซึ่งการประมวลผลข้อมูลทั้งหมดจะเกิดขึ้นในอุปกรณ์และพร้อมให้บริการแก่นักพัฒนาซอฟต์แวร์โดยไม่มีค่าใช้จ่าย บริการระบบคลาวด์ที่เป็นส่วนหนึ่งของ Firebase ML Kit ก่อนที่จะใช้งานได้ผ่าน Firebase ML และคุณยังใช้บริการเหล่านั้นควบคู่กับ API ของ ML Kit ได้
สำหรับ API ในอุปกรณ์ ML Kit SDK ใหม่ช่วยให้นักพัฒนาซอฟต์แวร์ผสานรวม ML Kit เข้ากับแอปได้ง่ายขึ้น ต่อจากนี้ต้องเพิ่มการอ้างอิงไปยังโปรเจ็กต์ของแอปและเริ่มใช้ API ได้เลย คุณไม่จำเป็นต้องตั้งค่าโปรเจ็กต์ Firebase เพื่อใช้ API ในอุปกรณ์
จะเกิดอะไรขึ้นกับโมเดลของฉันที่โฮสต์อยู่กับ Firebase
แมชชีนเลิร์นนิงของ Firebase จะยังให้บริการโมเดลของคุณต่อไป ฟังก์ชันการทำงานนั้นไม่มีการเปลี่ยนแปลง โดยมีการปรับปรุง 2-3 อย่าง ดังนี้
ตอนนี้คุณทำให้โมเดลใช้งานได้กับ Firebase แบบเป็นโปรแกรมได้แล้วโดยใช้ Python หรือ Node SDK
ตอนนี้คุณสามารถใช้ Firebase ML SDK ร่วมกับรันไทม์ TensorFlow Lite ได้แล้ว Firebase SDK จะดาวน์โหลดโมเดลไปยังอุปกรณ์ และรันไทม์ของ TensorFlow Lite จะทำการอนุมาน ซึ่งจะช่วยให้คุณเลือกเวอร์ชันรันไทม์ที่ต้องการ รวมถึงบิลด์ที่กำหนดเองได้อย่างง่ายดาย
ฉันจะได้รับสิทธิประโยชน์อะไรจากการย้ายข้อมูลไปยัง ML Kit SDK ใหม่
การย้ายข้อมูลไปยัง SDK ใหม่จะทำให้แอปพลิเคชันของคุณได้รับประโยชน์จากการแก้ไขข้อบกพร่องล่าสุดและการปรับปรุง API บนอุปกรณ์ ตัวอย่างเช่น
มีการเปลี่ยนแปลง 2 อย่างในรุ่นแรก
ดูรายการการเปลี่ยนแปลงล่าสุดทั้งหมดได้ในบันทึกประจำรุ่นของ ML Kit SDK
วันนี้ฉันใช้ ML Kit สำหรับ Firebase อยู่ ฉันจะต้องย้ายข้อมูลเมื่อใด
ขึ้นอยู่กับ ML Kit สำหรับ Firebase API ที่คุณใช้ในแอป
API พื้นฐานในอุปกรณ์ใน ML Kit สำหรับ Firebase SDK จะยังคงทำงานต่อไปในอนาคตอันใกล้ อย่างไรก็ตาม การชะลอการเปลี่ยนไปใช้ ML Kit SDK ใหม่จะทำให้
คุณไม่ได้รับประโยชน์จากฟีเจอร์และการอัปเดตใหม่ๆ นอกจากนี้ เมื่อคุณอัปเดตคอมโพเนนต์อื่นๆ ในแอปแล้ว คุณยังอาจพบกับข้อขัดแย้งของทรัพยากร Dependency ปัญหานี้อาจเกิดขึ้นเมื่อทรัพยากร Dependency อื่นๆ (โดยตรงหรือโดยอ้อม) บางรายการใหม่กว่าที่ ML Kit เดิมใน ML Kit for Firebase SDK คาดหวัง ตัวอย่างของไลบรารีที่อาจทำให้เกิดกรณีนี้ ได้แก่ OkHttp และ firebase-common
หากคุณใช้ Cloud API ผ่าน ML Kit สำหรับ Firebase SDK คุณไม่จำเป็นต้องทำการเปลี่ยนแปลงใดๆ ในขณะนี้
หากใช้การทำให้โมเดลที่กำหนดเองใช้งานได้ เราขอแนะนำให้อัปเกรดเป็นเวอร์ชันล่าสุดซึ่งจะทำให้เรียกใช้การอนุมานบนรันไทม์ของ TensorFlow Lite ได้โดยตรง
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eML Kit is now split into two products: ML Kit (on-device APIs) and Firebase Machine Learning (cloud-based APIs and custom model deployment).\u003c/p\u003e\n"],["\u003cp\u003eOn-device APIs like barcode scanning and text recognition have moved to the standalone ML Kit SDK; existing on-device APIs in Firebase ML Kit are deprecated.\u003c/p\u003e\n"],["\u003cp\u003eCloud-based APIs, such as image labeling and text recognition, remain available through Firebase ML.\u003c/p\u003e\n"],["\u003cp\u003eMigrating to the new ML Kit SDK ensures access to the latest features, bug fixes, and improvements, including custom models and lifecycle support.\u003c/p\u003e\n"],["\u003cp\u003eWhile on-device APIs in Firebase ML Kit will continue to function, developers are encouraged to migrate to the new ML Kit SDK to benefit from ongoing updates and avoid potential dependency conflicts.\u003c/p\u003e\n"]]],[],null,["# Migration guide\n\nOn June 3, 2020, we made some changes to ML Kit for Firebase to better distinguish the\non-device APIs from cloud based APIs. The current set of APIs is now split into\nthe following two products:\n\n- A new product, simply called [**ML Kit**](/ml-kit/guides), which will contain all the on-device APIs\n\n- [**Firebase Machine Learning**](https://firebase.google.com/docs/ml), focused on cloud-based APIs and custom model\n deployment.\n\nThis change will also make it easier to integrate ML Kit into your app if you only\nneed an on-device solution. This document explains how to migrate your app from the\nFirebase ML Kit SDK to the new ML Kit SDK.\n\nWhat's changing?\n----------------\n\n### On-device base APIs\n\nThe following APIs have moved to the new standalone ML Kit SDK.\n\n- Barcode scanning\n- Face detection\n- Image labeling\n- Object detection and tracking\n- Text recognition\n- Language ID\n- Smart reply\n- Translate\n- AutoML Vision Edge inference API\n\nThe existing on-device base APIs in the ML Kit for Firebase SDK are\ndeprecated and will no longer receive updates.\n\nIf you are using these APIs in\nyour app today, please migrate to the new ML Kit SDK, by following the\n**[ML Kit migration guide for Android](/ml-kit/migration/android)** and the\n**[ML Kit migration guide for iOS](/ml-kit/migration/ios)**.\n\n### Custom model APIs\n\nFor downloading models hosted in Firebase, the custom model downloader continues\nto be offered through the Firebase ML SDK. The SDK fetches the latest available\nmodel and passes it to the separate TensorFlow Lite runtime for inference.\n\nThe existing custom model interpreter in the ML Kit for Firebase SDK is deprecated\nand will no longer receive updates. We recommend using the TensorFlow Lite runtime\ndirectly for inference. Alternatively, if you only want to use custom models for\nimage labeling and object detection and tracking APIs, you can now use\n[custom models](/ml-kit/custom-models) in these APIs in ML Kit directly.\n\nSee the migration guides for\n[Android](https://firebase.google.com/docs/ml/android/migrate-from-legacy-api/)\nand [iOS](https://firebase.google.com/docs/ml/ios/migrate-from-legacy-api/)\nfor detailed instructions.\n\nWhat hasn't changed?\n--------------------\n\nCloud-based APIs and services will continue to be offered with Firebase ML:\n\n- The cloud-based image labeling, text recognition, and landmark recognition APIs\n are still available from the Firebase ML SDK.\n\n- Firebase ML also continues to offer [Model deployment](https://firebase.google.com/docs/ml/use-custom-models)\n\nFrequently asked questions\n--------------------------\n\n### Why this change?\n\nWe are making this change to clarify what solutions the product is offering.\nWith this change, the new ML Kit SDK is fully focused on on-device machine\nlearning where all data processing happens on-device and is available to\ndevelopers at no cost. The cloud services that were part of Firebase ML Kit\nbefore remain available through Firebase ML and you can still use these in\nparallel with ML Kit APIs.\n\nFor on-device APIs, the new ML Kit SDK makes it easier for developers to\nintegrate ML Kit into their app. Going forward, you just need to add\ndependencies to the app's project and then start using the API. There is no need\nto set up a Firebase project just to use on-device APIs.\n\n### What happens to my models that are being hosted with Firebase?\n\nFirebase Machine Learning will continue to serve your models as before. That\nfunctionality isn't changing. Here are a couple of improvements:\n\n- You can now deploy your models to Firebase programmatically using the\n [Python or Node SDKs](https://firebase.google.com/docs/ml/manage-hosted-models#manage_models_with_the_firebase_admin_sdk).\n\n- You can now use the Firebase ML SDK in conjunction with the TensorFlow\n Lite runtime. The Firebase SDK downloads the model to the device, and the TensorFlow\n Lite runtime performs the inference. This allows you to easily choose the\n runtime version you prefer, including a custom build.\n\n### What benefits do I get from migrating to the new ML Kit SDK?\n\nMigrating to the new SDK will ensure your applications benefit from the latest\nbug fixes and improvements to the on-device APIs. For example, here are a\ncouple of changes in the first release:\n\n- You can now use the new\n [custom image labeling](/ml-kit/vision/image-labeling#custom-tflite) and\n [custom object detection and tracking](/ml-kit/vision/object-detection#custom-tflite)\n APIs to easily integrate custom image classification models in your apps\n and build real-time interactive user experiences.\n\n- [Android Jetpack Lifecycle](https://developer.android.com/reference/androidx/lifecycle/Lifecycle)\n support is added to all APIs. You can now use `addObserver` to automatically\n manage the initiation and teardown of ML Kit APIs as the app goes through screen\n rotation or closure by the user / system. This makes integration with CameraX\n easier.\n\nA full list of the latest changes can be found in the [ML Kit SDK release\nnotes](/ml-kit/release-notes).\n\n### I am using ML Kit for Firebase today, when do I need to migrate over?\n\nThis depends on which ML Kit for Firebase APIs you currently use in your app.\n\n- The **on-device base APIs** in the ML Kit for Firebase SDK will continue to work for\n the foreseeable future. However, by delaying the switch to the new ML Kit SDK,\n you will not benefit from new features and updates. In addition, once you update\n other components in your app there is a risk you may\n run into dependencies conflicts. This can happen when some of your other dependencies (direct or indirect) are\n newer than the ones expected by the old ML Kit for Firebase SDK. Examples of\n libraries for which this may happen are OkHttp and firebase-common.\n\n- If you are using **Cloud APIs** via the ML Kit for Firebase SDK, no change is\n required at this time.\n\n- If you are using **Custom Model Deployment**, we recommend you upgrade to the latest\n version which allows running inferences directly on the TensorFlow Lite runtime."]]