تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
باستخدام واجهات برمجة التطبيقات الخاصة بتصنيف الصور في ML Kit، يمكنك رصد المعلومات واستخراجها
في صورة معيّنة على مستوى مجموعة واسعة من الفئات. يمكن لنموذج تصنيف الصور التلقائي تحديد الكائنات والأماكن والأنشطة العامة والأنواع الحيوانية والمنتجات وغيرها.
يمكنك أيضًا استخدام نموذج تصنيف مخصّص للصور لتخصيص الرصد لحالة استخدام معيّنة. راجِع استخدام نموذج TensorFlow Lite المخصّص للحصول على مزيد من المعلومات.
الإمكانات الرئيسية
مصنِّف أساسي فعال للأغراض العامة
يتعرف على أكثر من 400 فئة تصف أكثر العناصر التي يتم العثور عليها في الصور.
التخصيص حسب حالة الاستخدام باستخدام النماذج المخصّصة
استخدام نماذج أخرى مدرّبة مسبقًا من TensorFlow Hub أو نموذجك المخصّص الذي تم تدريبه باستخدام TensorFlow أو AutoML Vision Edge أو TensorFlow Lite إذ تم تصميم النماذج فيه.
واجهات برمجة تطبيقات عالية المستوى وسهلة الاستخدام
لا حاجة إلى التعامل مع عمليات إدخال/إخراج النماذج منخفضة المستوى، أو عمليات ما قبل المعالجة وبعدها، أو إنشاء مسار معالجة. تستخرج أداة ML Kit
التصنيفات من نموذج TensorFlow Lite وتقدّمها كوصف نصي.
يُرجى العلم أنّ واجهة برمجة التطبيقات هذه مخصّصة لنماذج تصنيف الصور التي تصف الصورة الكاملة. لتصنيف كائن واحد أو أكثر في صورة، مثل أحذية أو قطع أثاث، قد تكون واجهة برمجة التطبيقات
اكتشاف الأشياء وتتبّعها
مناسبة بشكل أفضل.
نماذج تصنيف الصور المتوافقة
تتوافق واجهات برمجة التطبيقات لتصنيف الصور مع نماذج مختلفة لتصنيف الصور:
نماذج تصنيف الصور المتوافقة
النموذج الأساسي
تستخدم واجهة برمجة التطبيقات تلقائيًا نموذجًا فعّالاً لتصنيف الصور للأغراض العامة
يتعرّف على أكثر من 400 عنصر
تغطي المفاهيم الأكثر شيوعًا في الصور.
طُرز TensorFlow Lite المخصّصة
لاستهداف المفاهيم الخاصة بالتطبيقات، تقبل واجهة برمجة التطبيقات
نماذج تصنيف الصور المخصّصة من
مجموعة كبيرة من المصادر. يمكن أن تكون هذه النماذج مدرَّبة مسبقًا
وتم تنزيلها من TensorFlow Hub أو نماذجك الخاصة التي تم تدريبها
باستخدام AutoML Vision Edge أو TensorFlow Lite Model Maker أو TensorFlow نفسه. يمكن تجميع النماذج مع تطبيقك أو استضافتها من خلال تقنية تعلُّم الآلة من Firebase وتنزيلها في وقت التشغيل.
استخدام النموذج الأساسي
يعرض النموذج الأساسي في أدوات تعلّم الآلة قائمة بالكيانات التي تحدّد الأشخاص
والأشياء والأماكن والأنشطة، وما إلى ذلك. يأتي كل كيان مع نتيجة
تشير إلى الثقة التي يمتلكها نموذج تعلُّم الآلة في صلته بالموضوع. وباستخدام هذه المعلومات، يمكنك تنفيذ مهام مثل إنشاء البيانات الوصفية تلقائيًا والإشراف على المحتوى. يتعرّف النموذج التلقائي المقدَّم في حزمة تعلّم الآلة على أكثر من 400 كيان مختلف.
يتيح النموذج الأساسي في واجهة برمجة التطبيقات لتصنيف الصور أكثر من 400 تصنيف، مثل الأمثلة التالية:
الفئة
أمثلة على التصنيفات
الأشخاص
Crowd Selfie Smile
الأنشطة
Dancing Eating Surfing
الأشياء
Car Piano Receipt
حيوانات
Bird Cat Dog
نباتات
Flower Fruit Vegetable
الأماكن
Beach Lake Mountain
أمثلة النتائج
إليك مثال على الكيانات التي تم التعرّف عليها في الصورة المرفقة.
الصورة: Clément Bucco-Lechat / Wikimedia Commons / CC BY-SA 3.0
التصنيف 0
Text
استاد
الثقة
0.9205354
التصنيف 1
Text
مراكز الرياضة
الثقة
0.7531109
التصنيف 2
Text
حدث
الثقة
0.66905296
التصنيف 3
Text
أنشطة ترفيهية
الثقة
0.59904146
التصنيف 4
Text
كرة القدم
الثقة
0.56384534
التصنيف 5
Text
الصافي
الثقة
0.54679185
التصنيف 6
Text
نبتة
الثقة
0.524364
استخدام نموذج TensorFlow Lite المخصّص
تم تصميم نموذج تصنيف الصور الأساسي في أدوات تعلّم الآلة من أجل استخدام الأغراض العامة. تم تدريبها للتعرف على 400 فئة تصف أكثر الأشياء التي تم العثور عليها
في الصور. قد يحتاج تطبيقك إلى نموذج متخصص لتصنيف الصور يتعرف على عدد أضيق من الفئات بمزيد من التفصيل، مثل نموذج يميز بين أنواع الزهور أو أنواع الطعام.
تتيح لك واجهة برمجة التطبيقات هذه إمكانية التخصيص وفق حالة استخدام معيّنة من خلال إتاحة نماذج تصنيف صور مخصّصة من مجموعة كبيرة من المصادر. يُرجى الرجوع إلى النماذج المخصّصة باستخدام حزمة تعلّم الآلة
لمزيد من المعلومات. يمكن تجميع النماذج المخصّصة مع تطبيقك أو تنزيلها
ديناميكيًا من السحابة الإلكترونية باستخدام خدمة نشر النماذج
الخاصة بتعلُّم الآلة من Firebase.
إذا لزم الأمر، تستخدم ميزة "تصنيف الصور" تحجيم الصور وتوسيعها بشكل ثنائي الخط لضبط حجم الصورة المدخلة ونسبة العرض إلى الارتفاع بحيث تتناسب مع متطلبات النموذج الأساسي.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eML Kit's image labeling APIs can detect and extract information about entities in an image, including objects, places, activities, and more.\u003c/p\u003e\n"],["\u003cp\u003eYou can leverage the powerful base model to identify over 400 common entities or use custom models tailored to specific use cases.\u003c/p\u003e\n"],["\u003cp\u003eML Kit simplifies the process with high-level APIs that abstract away low-level model complexities, making integration easier.\u003c/p\u003e\n"],["\u003cp\u003eEasily incorporate custom TensorFlow Lite models, whether bundled with your app or dynamically downloaded, to enable specialized image classification.\u003c/p\u003e\n"],["\u003cp\u003eImage Labeling automatically adjusts the input image size and aspect ratio to fit the model's requirements.\u003c/p\u003e\n"]]],[],null,["With ML Kit's image labeling APIs you can detect and extract information\nabout entities in an image across a broad group of categories. The default\nimage labeling model can identify general objects, places, activities, animal\nspecies, products, and more.\n\nYou can also use a custom image classification model to tailor detection\nto a specific use case. See [Using a custom TensorFlow Lite model](#custom-tflite)\nfor more information.\n\nKey capabilities\n\n- **A powerful general-purpose base classifier** Recognizes more than 400 categories that describe the most commonly found objects in photos.\n- **Tailor to your use case with custom models** Use other pre-trained models from TensorFlow Hub or your own custom model trained with TensorFlow, AutoML Vision Edge or TensorFlow Lite Model maker.\n- **Easy-to-use high-level APIs** No need to deal with low-level model input/output, image pre- and post-processing, or building a processing pipeline. ML Kit extracts the labels from the TensorFlow Lite model and provides them as a text description.\n\nNote that this API is intended for image classification models that describe the\nfull image. For classifying one or more objects in an image, such as shoes or\npieces of furniture, the\n[Object Detection \\& Tracking](/ml-kit/vision/object-detection)\nAPI may be a better fit.\n\nSupported image classification models\n\nThe Image Labeling APIs support different image classification models:\n\n| Supported image classification models ||\n|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Base model** | By default the API uses a powerful general-purpose image labeling model that recognizes more than 400 entities that cover the most commonly-found concepts in photos. |\n| **Custom TensorFlow Lite models** | To target application-specific concepts, the API accepts custom image classification models from a wide range of sources. These can be pre-trained models downloaded from TensorFlow Hub or your own models trained with AutoML Vision Edge, TensorFlow Lite Model Maker or TensorFlow itself. Models can be bundled with your app or hosted with Firebase Machine Learning and downloaded at run-time. |\n\nUsing the base model\n\nML Kit's base model returns a list of entities that identify people,\nthings, places, activities, and so on. Each entity comes with a score that\nindicates the confidence the ML model has in its relevance. With this\ninformation, you can perform tasks such as automatic metadata generation and\ncontent moderation. The default model provided with ML Kit recognizes more than\n[400 different entities](/ml-kit/vision/image-labeling/label-map).\n\n[iOS](/ml-kit/vision/image-labeling/ios)\n[Android](/ml-kit/vision/image-labeling/android)\n\nExample labels\n\nThe base model in the image labeling API supports 400+ labels, such as the\nfollowing examples:\n\n| Category | Example labels |\n|------------|------------------------------|\n| People | `Crowd` `Selfie` `Smile` |\n| Activities | `Dancing` `Eating` `Surfing` |\n| Things | `Car` `Piano` `Receipt` |\n| Animals | `Bird` `Cat` `Dog` |\n| Plants | `Flower` `Fruit` `Vegetable` |\n| Places | `Beach` `Lake` `Mountain` |\n\nExample results\n\nHere is an example of the entities that were recognized in the accompanying photo.\nPhoto: Clément Bucco-Lechat / Wikimedia Commons / CC BY-SA 3.0\n\n| Label 0 ||\n|----------------|------------|\n| **Text** | Stadium |\n| **Confidence** | 0.9205354 |\n| **Text** | Sports |\n| **Confidence** | 0.7531109 |\n| **Text** | Event |\n| **Confidence** | 0.66905296 |\n| **Text** | Leisure |\n| **Confidence** | 0.59904146 |\n| **Text** | Soccer |\n| **Confidence** | 0.56384534 |\n| **Text** | Net |\n| **Confidence** | 0.54679185 |\n| **Text** | Plant |\n| **Confidence** | 0.524364 |\n\nUsing a custom TensorFlow Lite model\n\nML Kit's base image labeling model is built for general-purpose use. It's\ntrained to recognize 400 categories that describe the most commonly-found\nobjects in photos. Your app might need a specialized image classification model\nthat recognizes a narrower number of categories in more detail, such as a model\nthat distinguishes between species of flowers or types of food.\n\nThis API lets you tailor to a particular use case by supporting custom image\nclassification models from a wide range of sources. Please refer to [Custom models with ML Kit](/ml-kit/custom-models)\nto learn more. Custom models can be bundled with your app or dynamically\ndownloaded from the cloud using Firebase Machine Learning's Model deployment\nservice.\n\n[iOS](/ml-kit/vision/image-labeling/custom-models/ios)\n[Android](/ml-kit/vision/image-labeling/custom-models/android)\n\nInput image preprocessing\n\nIf needed, Image Labeling uses bilinear image scaling and stretching to adjust\nthe input image size and aspect ratio so that they fit the requirements of the\nunderlying model."]]