অ্যান্ড্রয়েডে এমএল কিট মডেল ইনস্টলেশনের পথ
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
সমস্ত ML কিট বৈশিষ্ট্যগুলি ডিফল্টরূপে Google-প্রশিক্ষিত মেশিন লার্নিং মডেলগুলি (বেস মডেল হিসাবে পরিচিত) ব্যবহার করে৷ এই নির্দেশিকা শুধুমাত্র বেস মডেলের জন্য প্রযোজ্য। কাস্টম মডেলের নির্দেশিকা জন্য এখানে দেখুন.
এমএল কিট এপিআই-এর মডেলগুলি তিনটি উপায়ের মধ্যে একটিতে ইনস্টল করা যেতে পারে:
- আনবান্ডেড: মডেলগুলি ডাউনলোড এবং Google Play পরিষেবার মাধ্যমে পরিচালিত হয়৷
- বান্ডিল: মডেলগুলি বিল্ড টাইমে আপনার অ্যাপের সাথে স্ট্যাটিকভাবে লিঙ্ক করা হয়।
- গতিশীলভাবে ডাউনলোড করা: মডেলগুলি চাহিদা অনুযায়ী ডাউনলোড করা হয়।
প্রতিটি API-এর জন্য সমর্থিত ইনস্টলেশন পাথ
নীচের টেবিলটি দেখায় যে কোন মডেল ইনস্টলেশন পাথগুলি প্রতিটি ML কিট বৈশিষ্ট্য দ্বারা সমর্থিত:
API-নির্দিষ্ট গাইড দেখায় যে প্রদত্ত API-এর জন্য কোন ইনস্টলেশন বিকল্পগুলি উপলব্ধ।
ইনস্টলেশন বিকল্পগুলির মধ্যে মূল পার্থক্য
বান্ডিল এবং আনবান্ডেলের মধ্যে কীভাবে নির্বাচন করবেন
যদি একটি API উভয়ই বান্ডিল এবং আনবান্ডেড ইনস্টলেশন বিকল্পগুলিকে সমর্থন করে:
কিভাবে মডেল ডাউনলোড করবেন
আনবান্ডেড মডেল বিকল্প ব্যবহার করার সময়, আপনি ডিভাইসে মডেলগুলি কীভাবে ডাউনলোড করতে চান তা নির্দিষ্ট করতে পারেন:
আপনি আপনার অ্যাপের AndroidManifest.xml
ফাইলে একটি ঘোষণা যোগ করে ইনস্টল-টাইম মডেল ডাউনলোড সক্ষম করতে পারেন। উদাহরণস্বরূপ, নীচের কোড স্নিপেটটি দেখায় যে আপনার অ্যাপটি প্লে স্টোর থেকে ইনস্টল হওয়ার পরে বারকোড স্ক্যানিং মডেলটি স্বয়ংক্রিয়ভাবে ডাউনলোড করার জন্য কীভাবে আপনার অ্যাপটি কনফিগার করবেন:
<application ...>
...
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="barcode" >
<!-- To use multiple models: android:value="barcode,model2,model3" -->
</application>
আপনি Google Play Services ModuleInstallClient API-এর মাধ্যমে স্পষ্ট ডাউনলোডের অনুরোধ করতে পারেন।
আপনি যদি ইনস্টল-টাইম মডেল ডাউনলোডগুলি সক্ষম না করেন বা স্পষ্ট ডাউনলোডের অনুরোধ না করেন, আপনি প্রথমবার বৈশিষ্ট্যটি চালানোর সময় মডেলটি ডাউনলোড করা হবে৷ ডাউনলোড সম্পূর্ণ না হওয়া পর্যন্ত, অনুমান অনুরোধ ব্যর্থ হবে।
কিভাবে মডেল আপডেট করবেন
বান্ডিল মডেল বা গতিশীলভাবে ডাউনলোড করা মডেল বিকল্প ব্যবহার করার সময় আপনার মডেল আপডেট করতে:
লেটেস্ট এমএল কিট ফিচার ক্লায়েন্ট লাইব্রেরি ব্যবহার করতে আপনার অ্যাপের গ্রেডল ফাইল আপডেট করুন।
dependencies {
implementation 'com.google.mlkit:barcode-scanning: 17.3.0' // The latest version number of the API
}
আপনার অ্যাপ্লিকেশন পুনর্নির্মাণ.
কেন কিছু API গতিশীলভাবে ডাউনলোড করা মডেল অফার করে
কিছু ML Kit API-এ বান্ডিল করার জন্য অনেকগুলি মডেল বিকল্প রয়েছে৷ উদাহরণস্বরূপ, ডিজিটাল কালি শনাক্তকরণ 300+ ভাষা সমর্থন করে, এবং ইনস্টলেশনের সময় বৈশিষ্ট্যের ভিতরে প্রতিটি ভাষা রাখা সবসময় প্রয়োজন হয় না। সেই উদ্দেশ্যে, আমরা তৃতীয় ইনস্টলেশন বিকল্প প্রদান করি, যেখানে মডেলগুলি ইনস্টলেশনের পরে চাহিদা অনুযায়ী ডাউনলোড করা হয়। বর্তমানে, শুধুমাত্র ডিজিটাল কালি স্বীকৃতি , অনুবাদ এবং সত্তা নিষ্কাশন এই বিকল্প আছে.
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-09-03 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-09-03 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eML Kit features utilize Google-trained machine learning models, offering three installation options: unbundled, bundled, and dynamically downloaded.\u003c/p\u003e\n"],["\u003cp\u003eUnbundled models are downloaded via Google Play Services, while bundled models are included in the app, and dynamically downloaded models are fetched on demand.\u003c/p\u003e\n"],["\u003cp\u003eChoosing between bundled and unbundled models depends on priorities: bundled for immediate functionality, unbundled for smaller app size and automatic updates.\u003c/p\u003e\n"],["\u003cp\u003eModels can be downloaded at install time, explicitly requested, or downloaded on first use, and updates for bundled or dynamically downloaded models require app updates.\u003c/p\u003e\n"],["\u003cp\u003eDynamically downloaded models are offered for APIs with extensive model options, such as Digital Ink Recognition and Translation, to avoid bundling all possibilities.\u003c/p\u003e\n"]]],[],null,["All ML Kit features make use of Google-trained machine learning models (known as\nbase models) by default. This guide is only applicable to base models. [See here\nfor guidance on custom models.](/ml-kit/custom-models)\n\nModels in ML Kit APIs can be installed in one of three ways:\n\n1. **Unbundled:** Models are downloaded and managed via Google Play Services.\n2. **Bundled:** Models are statically linked to your app at build time.\n3. **Dynamically downloaded:** Models are downloaded on demand.\n\nSupported installation paths for each API\n\nThe table below shows which model installation paths are supported by each ML\nKit feature:\n\n|---------------------------------------------------------------------------|---------------|-------------|----------------------------|\n| | **Unbundled** | **Bundled** | **Dynamically downloaded** |\n| [Text recognition v2](/ml-kit/vision/text-recognition/v2/android) | ✅ | ✅ | |\n| [Face detection](/ml-kit/vision/face-detection/android) | ✅ | ✅ | |\n| [Face mesh detection](/ml-kit/vision/face-mesh-detection/android) | | ✅ | |\n| [Pose detection](/ml-kit/vision/pose-detection/android) | | ✅ | |\n| [Selfie segmentation](/ml-kit/vision/selfie-segmentation/android) | | ✅ | |\n| [Barcode scanning](/ml-kit/vision/barcode-scanning/android) | ✅ | ✅ | |\n| [Image labeling](/ml-kit/vision/image-labeling/android) | ✅ | ✅ | |\n| [Object detection and tracking](/ml-kit/vision/object-detection/android) | | ✅ | |\n| [Digital ink recognition](/ml-kit/vision/digital-ink-recognition/android) | | | ✅ |\n| [Document scanner](/ml-kit/vision/doc-scanner) | ✅ | | |\n| [Subject segmentation](/ml-kit/vision/subject-segmentation/android) | ✅ | | |\n| [Google code scanner](/ml-kit/code-scanner) | ✅ | | |\n| [Language identification](/ml-kit/language/identification/android) | ✅ | ✅ | |\n| [Translation](/ml-kit/language/translation/android) | | | ✅ |\n| [Smart Reply](/ml-kit/language/smart-reply/android) | ✅ | ✅ | |\n| [Entity Extraction](/ml-kit/language/entity-extraction/android) | | | ✅ |\n\nAPI-specific guides show which installation options are available for the given\nAPI.\n\nKey differences between installation options\n\n|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | **Unbundled** | **Bundled** | **Dynamically downloaded** |\n| **Where are models stored?** | Resides in Google Play Services and is not counted towards the storage used by this app | Saved in [app-specific storage](https://developer.android.com/training/data-storage/app-specific) after installation | Saved in [app-specific storage](https://developer.android.com/training/data-storage/app-specific) after model download |\n| **How does model size affect app size?** | Does not contribute to app size | Directly contributes to app size | Does not contribute to app size but increase the [app-specific storage](https://developer.android.com/training/data-storage/app-specific) |\n| **When are models updated?** | Automatically updated when a newer version is released | [Need to update the app to update model](#update-model) | [Need to update the app to update model](#update-model) |\n| **When are models downloaded?** | [Models must be downloaded before use](#download-models) | All models and features are included when the app is installed, so are usable immediately | Model downloads, updates, and deletions must be managed manually using the [RemoteModelManager](/android/reference/com/google/mlkit/common/model/RemoteModelManager) API |\n| **When are models removed from the device?** | Google Play Services will only remove the model from storage if all apps that depend on the model are uninstalled | Models are removed from [app-specific storage](https://developer.android.com/training/data-storage/app-specific) when the app is uninstalled | Downloaded models are removed from [app-specific storage](https://developer.android.com/training/data-storage/app-specific) when the app is uninstalled |\n\nHow to choose between bundled and unbundled\n\nIf an API supports both the bundled and unbundled installation options:\n\n- Use the bundled option if you prioritize:\n\n - Complete feature functionality immediately after app installation\n - Feature functionality without network connection after app installation\n- Use the unbundled option if you prioritize:\n\n - Smaller app size\n - Automated model updates by Google Play Services\n\nHow to download models\n\nWhen using the unbundled model option, you can specify how you want models to be\ndownloaded to the device:\n\n- You can enable **install-time model downloads** by adding a declaration to\n your app's `AndroidManifest.xml` file. For example, the code snippet below\n shows how to configure your app to automatically download the Barcode\n Scanning model after your app is installed from the Play Store:\n\n \u003capplication ...\u003e\n ...\n \u003cmeta-data\n android:name=\"com.google.mlkit.vision.DEPENDENCIES\"\n android:value=\"barcode\" \u003e\n \u003c!-- To use multiple models: android:value=\"barcode,model2,model3\" --\u003e\n \u003c/application\u003e\n\n- You can **request explicit download** through Google Play Services\n [ModuleInstallClient API](/android/guides/module-install-apis).\n\n- If you don't enable install-time model downloads or request explicit\n download, the model will be downloaded the first time you run the feature.\n Until the download is completed, inference requests will fail.\n\nHow to update models\n\nTo update your models when using the bundled model or the dynamically downloaded\nmodels option:\n\n1. Update your app's gradle file to use the latest ML Kit feature client\n library.\n\n dependencies {\n implementation 'com.google.mlkit:barcode-scanning: 17.3.0' // The latest version number of the API\n }\n\n2. Rebuild your app.\n\nWhy some APIs offer dynamically downloaded models\n\nSome ML Kit API have too many model options to bundle. For example, [Digital ink\nrecognition](/ml-kit/vision/digital-ink-recognition) supports [300+\nlanguages](/ml-kit/vision/digital-ink-recognition/base-models), and it's not\nalways necessary to put every language inside the feature during installation.\nFor that purpose, we provide the third installation option, in which models are\ndownloaded on demand after installation. Currently, only [Digital ink\nrecognition](/ml-kit/vision/digital-ink-recognition),\n[Translation](/ml-kit/language/translation) and [Entity\nextraction](/ml-kit/language/entity-extraction) have this option."]]