ImageLabeler class

Used for finding ImageLabels in a supplied image.

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.

A image labeler is created via imageLabeler([ImageLabelerOptions options]) or cloudImageLabeler([CloudImageLabelerOptions options]) in FirebaseVision:

final FirebaseVisionImage image =
    FirebaseVisionImage.fromFilePath('path/to/file');

final ImageLabeler imageLabeler =
    FirebaseVision.instance.imageLabeler(options);

final List<ImageLabel> labels = await imageLabeler.processImage(image);

Properties

hashCode int
The hash code for this object.
no setterinherited
modelType ModelType
Indicates whether this labeler is ran on device or in the cloud.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Release resources used by this labeler.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processImage(FirebaseVisionImage visionImage) Future<List<ImageLabel>>
Finds entities in the input image.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited