การย้ายข้อมูลจาก Google Mobile Vision
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Google Mobile Vision ถูกเลิกใช้งานแล้ว และเราขอให้นักพัฒนาแอปเปลี่ยนไปใช้ ML Kit SDK ซึ่งเป็น SDK ที่ใช้แทน การย้ายข้อมูลไปยัง SDK ใหม่จะช่วยให้คุณได้รับประสิทธิภาพ ความเสถียร และฟีเจอร์ล่าสุดที่ดีที่สุด นอกจากนี้ ML Kit ยังมี API ที่ทำงานด้วยระบบ ML เพิ่มเติม ไม่ใช่แค่สำหรับกรณีการใช้งานเกี่ยวกับภาพเท่านั้น แต่ยังรวมถึงกรณีการใช้งานเกี่ยวกับภาษาธรรมชาติด้วย
หากคุณใช้ API การสแกนบาร์โค้ด การจดจำข้อความ หรือการตรวจจับใบหน้าของ Mobile Vision ในแอปของคุณในปัจจุบัน โปรดย้ายข้อมูลไปยัง ML Kit SDK เวอร์ชันใหม่โดยทําตามคําแนะนําในการย้ายข้อมูล ML Kit สําหรับ Android และคําแนะนําในการย้ายข้อมูล ML Kit สําหรับ iOS
คำถามที่พบบ่อย
ฉันจะทราบได้อย่างไรว่าแอปใช้ Mobile Vision อยู่หรือไม่
ใน Android ให้ตรวจสอบว่าไฟล์ Gradle ของโมดูล (ระดับแอป) (โดยปกติจะเป็นไฟล์ app/build.gradle
) มีทรัพยากร Dependency นี้หรือไม่
com.google.android.gms:play-services-vision:x.x.x
ใน iOS ให้ตรวจสอบว่า Podfile ของคุณมีข้อมูลต่อไปนี้หรือไม่
pod 'GoogleMobileVision/FaceDetector', '8.0.0'
pod 'GoogleMobileVision/BarcodeDetector', '8.0.0'
pod 'GoogleMobileVision/TextDetector', '8.0.0'
ประโยชน์ที่ฉันจะได้รับจากการย้ายข้อมูลไปยัง ML Kit SDK มีอะไรบ้าง
เนื่องจากมีการเลิกใช้งาน API ที่มีอยู่ซึ่ง Mobile Vision SDK นำเสนอ API เหล่านั้นจึงจะไม่ได้รับอัปเดตอีกต่อไป การย้ายข้อมูลไปยัง ML Kit จะช่วยให้แอปพลิเคชันได้รับประโยชน์จากการแก้ไขข้อบกพร่องและการปรับปรุง API ล่าสุด รวมถึงโมเดล ML ที่อัปเดตแล้วและการเร่งด้วยฮาร์ดแวร์
นอกจากนี้ ML Kit API ยังมีข้อดีอื่นๆ ดังนี้
- API เวอร์ชันใหม่แบบรวมกลุ่มใน Android ที่ช่วยให้คุณลิงก์ ML Kit SDK กับแอปพลิเคชันแบบคงที่
การปรับปรุงเฉพาะ API เช่น
เพิ่มการรองรับ Android Jetpack Lifecycle ลงใน API ทั้งหมด ตอนนี้คุณใช้ addObserver
เพื่อจัดการการเริ่มต้นและปิดใช้งาน ML Kit API โดยอัตโนมัติได้แล้วเมื่อแอปมีการหมุนหน้าจอหรือปิดโดยผู้ใช้ / ระบบ ซึ่งทำให้การผสานรวมกับ CameraX ง่ายขึ้น
ดูรายการการเปลี่ยนแปลงล่าสุดทั้งหมดได้ในบันทึกประจำรุ่นของ ML Kit SDK
ML Kit API มีฟังก์ชันการทำงานเหมือนกับ Mobile Vision API ไหม
API การสแกนบาร์โค้ด การจดจำข้อความ และการตรวจจับใบหน้ามีฟังก์ชันการทำงานและความสามารถเหมือนกับ API ของ Mobile Vision
ข้อยกเว้นคือ ML Kit ไม่รองรับตัวตรวจจับหลายตัว โปรเซสเซอร์หลายตัว และโปรเซสเซอร์โฟกัสใน Mobile Vision อีกต่อไป นักพัฒนาแอปสามารถติดตั้งใช้งานฟังก์ชันการทำงานเดียวกันนี้ได้โดยง่ายหากต้องการ
การขอความช่วยเหลือ
หากพบปัญหาใดๆ โปรดไปที่หน้าชุมชนซึ่งจะแสดงช่องทางต่างๆ ที่ใช้ติดต่อเราได้
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-29 UTC
[null,null,["อัปเดตล่าสุด 2025-08-29 UTC"],[[["\u003cp\u003eGoogle Mobile Vision is deprecated and developers should migrate to the ML Kit SDK for continued support and new features.\u003c/p\u003e\n"],["\u003cp\u003eML Kit offers enhanced performance, stability, and access to the latest machine learning advancements, including new APIs for Vision and Natural Language.\u003c/p\u003e\n"],["\u003cp\u003eMigration guides are available for both Android and iOS to assist developers in transitioning their apps from Mobile Vision to ML Kit.\u003c/p\u003e\n"],["\u003cp\u003eML Kit provides additional benefits like bundled variants on Android, API-specific improvements such as raw barcode output and Euler X angle in face detection, and Android Jetpack Lifecycle support for easier integration with CameraX.\u003c/p\u003e\n"]]],[],null,["Google Mobile Vision was deprecated and we are asking developers to migrate to the ML Kit SDK which is its replacement. Migrating to the new SDK ensures you get the best performance, stability and latest features. In addition, ML Kit provides additional ML-powered APIs, not only for Vision, but also Natural Language use cases.\n\nIf you are using Mobile Vision's barcode scanning, text recognition or face detection APIs in your app today, please migrate to the new ML Kit SDK, by following the\n**[ML Kit migration guide for Android](/ml-kit/mobile-vision-migration/android)** and the\n**[ML Kit migration guide for iOS](/ml-kit/mobile-vision-migration/ios)**.\n\nFrequently asked questions\n\nHow do I know if my app is using Mobile Vision?\n\nOn Android, check if your module (app-level) Gradle file (usually\n`app/build.gradle`) contains this dependency:\n\n- `com.google.android.gms:play-services-vision:x.x.x`\n\nOn iOS, check if you podfile contains one of these dependencies:\n\n- `pod 'GoogleMobileVision/FaceDetector', '8.0.0'`\n- `pod 'GoogleMobileVision/BarcodeDetector', '8.0.0'`\n- `pod 'GoogleMobileVision/TextDetector', '8.0.0'`\n\nWhat benefits do I get from migrating to the ML Kit SDK?\n\nSince the existing APIs offered by the Mobile Vision SDK are deprecated, they\nwill no longer receive updates. Migrating to ML Kit ensures your application\nbenefits from the latest bug fixes and improvements to the APIs, including\nupdated ML models and hardware acceleration.\n\nIn addition, the ML Kit APIs offer some other benefits:\n\n- New bundled variants of the APIs on Android that allow you to statically link the ML Kit SDK with your appplication.\n- API specific improvements, for example:\n\n - [Barcode Scanning API](/ml-kit/vision/barcode-scanning) now supports raw output\n - [Face Detection API](/ml-kit/vision/face-detection) now provides the Euler X angle\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\nDo the ML Kit APIs provide the same functionality as the Mobile Vision APIs?\n\nThe Barcode scanning, Text recognition and Face detection APIs provide the same\nfunctionality and capabilities as their Mobile Vision counter-parts.\n\nAn exception is that multi-detectors, multi-processors and focusing-processors in\nMobile Vision are no longer supported in ML Kit. The same functionality can be\nimplemented relatively easily by the developer if desired.\n\nGetting help\n\nIf you run into any issues, check out our [Community page](/ml-kit/community)\nwhere we outline the channels available for getting in touch with us."]]