Image Labeling

With ML Kit's image labeling APIs, you can recognize entities in an image without having to provide any additional contextual metadata, using either an on-device API or a cloud-based API.

Image labeling gives you insight into the content of images. When you use the API, you get a list of the entities that were recognized: people, things, places, activities, and so on. Each label found comes with a score that indicates the confidence the ML model has in its relevance. With this information, you can perform tasks such as automatic metadata generation and content moderation.

iOS Android

If you're a Flutter developer, you might be interested in FlutterFire, which includes a plugin for Firebase's ML Vision APIs.

Choose between on-device and Cloud APIs

On-deviceCloud
PricingFree

Free for first 1000 uses of this feature per month: see Pricing

Label coverage

400+ labels that cover the most commonly-found concepts in photos. See below.

10,000+ labels in many categories. See below.

Also, try the Cloud Vision API demo to see what labels can be found for an image you provide.

Knowledge Graph entity ID support

Example on-device labels

The device-based API supports 400+ labels, such as the following examples:

CategoryExample labels
PeopleCrowd
Selfie
Smile
ActivitiesDancing
Eating
Surfing
ThingsCar
Piano
Receipt
AnimalsBird
Cat
Dog
PlantsFlower
Fruit
Vegetable
PlacesBeach
Lake
Mountain

Example cloud labels

The cloud-based API supports 10,000+ labels, such as the following examples:

CategoryExample labelsCategoryExample labels
Arts & entertainmentSculpture
Musical Instrument
Dance
Astronomical objectsComet
Galaxy
Star
Business & industrialRestaurant
Factory
Airline
ColorsRed
Green
Blue
DesignFloral
Pattern
Wood Stain
DrinkCoffee
Tea
Milk
EventsMeeting
Picnic
Vacation
Fictional charactersSanta Claus
Superhero
Mythical creature
FoodCasserole
Fruit
Potato chip
Home & gardenLaundry basket
Dishwasher
Fountain
ActivitiesWedding
Dancing
Motorsport
MaterialsCeramic
Textile
Fiber
MediaNewsprint
Document
Sign
Modes of transportAircraft
Motorcycle
Subway
OccupationsActor
Florist
Police
OrganismsPlant
Animal
Fungus
OrganizationsGovernment
Club
College
PlacesAirport
Mountain
Tent
TechnologyRobot
Computer
Solar panel
ThingsBicycle
Pipe
Doll

Google Knowledge Graph entity IDs

In addition the text description of each label that ML Kit returns, it also returns the label's Google Knowledge Graph entity ID. This ID is a string that uniquely identifies the entity represented by the label, and is the same ID used by the Knowledge Graph Search API. You can use this string to identify an entity across languages, and independently of the formatting of the text description.

Example results

Photo: Clément Bucco-Lechat / Wikimedia Commons / CC BY-SA 3.0
On-deviceCloud
DescriptionStadium
Knowledge Graph entity ID/m/019cfy
Confidence0.9205354
DescriptionSports
Knowledge Graph entity ID/m/06ntj
Confidence0.7531109
DescriptionEvent
Knowledge Graph entity ID/m/081pkj
Confidence0.66905296
DescriptionLeisure
Knowledge Graph entity ID/m/04g3r
Confidence0.59904146
DescriptionSoccer
Knowledge Graph entity ID/m/02vx4
Confidence0.56384534
DescriptionNet
Knowledge Graph entity ID/m/02qdwbp
Confidence0.54679185
DescriptionPlant
Knowledge Graph entity ID/m/05s2s
Confidence0.524364

... etc.

Descriptionsport venue
Knowledge Graph entity ID/m/0bmgjqz
Confidence0.9860726
Descriptionplayer
Knowledge Graph entity ID/m/02vzx9
Confidence0.9797604
Descriptionstadium
Knowledge Graph entity ID/m/019cfy
Confidence0.9635762
Descriptionsoccer specific stadium
Knowledge Graph entity ID/m/0404y4
Confidence0.95806926
Descriptionfootball player
Knowledge Graph entity ID/m/0gl2ny2
Confidence0.9510419
Descriptionsports
Knowledge Graph entity ID/m/06ntj
Confidence0.9253524
Descriptionsoccer player
Knowledge Graph entity ID/m/0pcq81q
Confidence0.9033665
Descriptionarena
Knowledge Graph entity ID/m/018lrm
Confidence0.8897188

... etc.