ImageClassifierOptions class final

Options for the official Image Classifier.

Inheritance

Constructors

ImageClassifierOptions({DownloadAsset? model, String? modelPath, Uint8List? modelBytes, RunningMode runningMode = RunningMode.image, Delegate delegate = Delegate.cpu, String? displayNamesLocale, int maxResults = -1, double scoreThreshold = 0, List<String>? categoryAllowlist, List<String>? categoryDenylist})
Defaults match Google's.

Properties

categoryAllowlist → List<String>
Category names to keep; exclusive with categoryDenylist.
final
categoryDenylist → List<String>
Category names to drop; exclusive with categoryAllowlist.
final
delegate → Delegate
The processor the task runs on, fixed until it is disposed.
finalinherited
displayNamesLocale → String?
Locale of the display names in the model metadata.
final
hashCode → int
The hash code for this object.
no setterinherited
maxResults → int
Maximum categories per head; negative returns all of them.
final
model → DownloadAsset?
Pinned official model: the app's bundled copy, or a download when ModelStore.allowDownloads is true. Verified against its SHA-256.
finalinherited
modelBytes → Uint8List?
Owned, read-only model bytes. Null when the model is a file.
no setterinherited
modelPath → String?
The model's location, as Google's APIs read it: a file on native platforms and a URL, resolved against the page, in browsers. Null when the model is in memory.
no setterinherited
runningMode → RunningMode
Still images or timestamped frames.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scoreThreshold → double
Categories scoring below this are dropped.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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