Classifications class

Dart representation of MediaPipe's "Classifications" concept.

Represents the list of classifications for a given classifier head. Typically used as a result for classification tasks.

See also:

This io-friendly implementation is not immutable strictly for memoization of computed fields. All values used by pkg:equatable are in fact immutable.

Inheritance

Constructors

Classifications({required Iterable<Category> categories, required int headIndex, required String? headName})
Instantiates a Classifications object with fake values for testing.
Classifications.native(Pointer<Classifications>? _pointer)
Instatiates a Classifications object as a wrapper around native memory.

Properties

categories Iterable<Category>
A list of Category objects which contain the actual classification information, including human-readable labels and probability scores.
no setteroverride
firstCategory BaseCategory?
Convenience getter for the first Category out of the categories list.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
headIndex int
The index of the classifier head these entries refer to.
no setteroverride
headName String?
The optional name of the classifier head, which is the corresponding tensor metadata name.
no setteroverride
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

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

Static Methods

fromNativeArray(Pointer<Classifications> structs, int count) Iterable<Classifications>
Accepts a pointer to a list of structs, and a count representing the length of the list, and returns a list of pure-Dart Classifications instances.