Firebase Machine Learning เป็น SDK สำหรับอุปกรณ์เคลื่อนที่ที่นำความเชี่ยวชาญด้านแมชชีนเลิร์นนิงของ Google มาสู่แอป Android และ Apple ในแพ็กเกจที่ทรงพลังแต่ใช้งานง่าย
ไม่ว่าคุณจะเพิ่งเริ่มใช้หรือมีประสบการณ์ด้านแมชชีนเลิร์นนิง คุณก็สามารถ
ใช้ฟังก์ชันที่คุณต้องการได้ด้วยโค้ดเพียงไม่กี่บรรทัด คุณไม่จำเป็นต้องมีความรู้เชิงลึกเกี่ยวกับโครงข่ายประสาทเทียมหรือการเพิ่มประสิทธิภาพโมเดลเพื่อเริ่มต้นใช้งาน
ในทางกลับกัน หากคุณเป็นนักพัฒนา ML ที่มีประสบการณ์
Firebase ML จะมี API ที่สะดวกซึ่งช่วยให้คุณใช้โมเดล TensorFlow Lite ที่กำหนดเองในแอปบนอุปกรณ์เคลื่อนที่ได้
เมื่อใช้ Firebase ML กับ Remote Config คุณจะแสดงโมเดลที่แตกต่างกันต่อกลุ่มผู้ใช้ที่แตกต่างกันได้ และเมื่อใช้ A/B Testing คุณจะทำการทดสอบเพื่อค้นหาโมเดลที่มีประสิทธิภาพดีที่สุดได้ (ดูคำแนะนำสำหรับ Apple และ Android)
พร้อมใช้งานจริงสำหรับกรณีการใช้งานทั่วไป
Firebase ML มาพร้อมกับชุด API ที่พร้อมใช้งานสำหรับกรณีการใช้งานทั่วไปบนอุปกรณ์เคลื่อนที่
ได้แก่ การจดจำข้อความ การติดป้ายกำกับรูปภาพ และการระบุสถานที่สำคัญ
เพียงส่งข้อมูลไปยังFirebase MLไลบรารี แล้วไลบรารีจะให้ข้อมูลที่คุณต้องการ
API เหล่านี้ใช้ประโยชน์จากความสามารถของเทคโนโลยีแมชชีนเลิร์นนิงของ Google Cloud
เพื่อให้คุณได้รับความแม่นยำในระดับสูงสุด
ระบบคลาวด์เทียบกับในอุปกรณ์
Firebase ML มี API ที่ทำงานได้ทั้งในระบบคลาวด์หรือบนอุปกรณ์
เมื่อเราอธิบายว่า ML API เป็น Cloud API หรือ On-Device API เรากำลังอธิบายว่าเครื่องใดทำการอนุมาน นั่นคือเครื่องใดใช้โมเดล ML เพื่อค้นพบข้อมูลเชิงลึกเกี่ยวกับข้อมูลที่คุณให้ ใน Firebase ML
การดำเนินการนี้จะเกิดขึ้นใน Google Cloud หรือในอุปกรณ์เคลื่อนที่ของผู้ใช้
API การจดจำข้อความ การติดป้ายกำกับรูปภาพ และการจดจำสถานที่สำคัญจะทำการอนุมานในระบบคลาวด์
โมเดลเหล่านี้มีกำลังการประมวลผลและหน่วยความจำมากกว่าโมเดลในอุปกรณ์ที่เทียบเท่ากัน จึงสามารถทำการอนุมานด้วยความแม่นยำและความเที่ยงตรงมากกว่าโมเดลในอุปกรณ์
ในทางกลับกัน คำขอทั้งหมดที่ส่งไปยัง API เหล่านี้ต้องมีการรับส่งข้อมูลผ่านเครือข่าย
ซึ่งทำให้ไม่เหมาะสำหรับแอปพลิเคชันแบบเรียลไทม์และแอปพลิเคชันที่มีเวลาในการตอบสนองต่ำ เช่น
การประมวลผลวิดีโอ
API โมเดลที่กำหนดเองจะจัดการกับโมเดล ML ที่ทำงานบน
อุปกรณ์ โมเดลที่ฟีเจอร์เหล่านี้ใช้และสร้างขึ้นคือโมเดล TensorFlow Lite ซึ่งได้รับการ
เพิ่มประสิทธิภาพให้ทำงานบนอุปกรณ์เคลื่อนที่ ข้อได้เปรียบที่สำคัญที่สุดของโมเดลเหล่านี้คือ
ไม่จำเป็นต้องเชื่อมต่อเครือข่ายและทำงานได้อย่างรวดเร็ว
เช่น เร็วพอที่จะประมวลผลเฟรมของวิดีโอแบบเรียลไทม์
Firebase ML ช่วยให้คุณสามารถ
ติดตั้งใช้งานโมเดลที่กำหนดเองในอุปกรณ์ของผู้ใช้ได้โดย
การอัปโหลดโมเดลไปยังเซิร์ฟเวอร์ของเรา แอปที่เปิดใช้ Firebase จะดาวน์โหลดโมเดลไปยังอุปกรณ์ตามคำขอ
ซึ่งจะช่วยให้คุณคงขนาดการติดตั้งเริ่มต้นของแอปให้มีขนาดเล็ก และสามารถสลับโมเดล ML ได้โดยไม่ต้องเผยแพร่แอปอีกครั้ง
ML Kit: โมเดลในอุปกรณ์ที่พร้อมใช้งาน
หากกำลังมองหาโมเดลที่ฝึกไว้ล่วงหน้าซึ่งทำงานบนอุปกรณ์ ให้ดู ML Kit ML Kit พร้อมใช้งาน
สำหรับ iOS และ Android และมี API สำหรับ Use Case มากมาย ดังนี้
[[["เข้าใจง่าย","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-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."]]