Type Alias: Classifier<L>
Classifier<
L> =object
Defined in: extensions/cv/tasks/classification.ts:72
Image classification task runner.
Type Parameters
L
L
The type representing the classification labels.
Properties
classify()
readonlyclassify: (input,options?) =>Promise<Classification<L>[]>
Defined in: extensions/cv/tasks/classification.ts:89
Performs asynchronous image classification on the given input image.
Parameters
input
The input image buffer.
options?
Configuration options for classification. See ClassifyOptions.
Returns
Promise<Classification<L>[]>
A promise resolving to the list of classifications sorted by confidence.
Throws
With code INVALID_ARGUMENT if topk is
negative, RESOURCE_BUSY if the model is in use, or
RESOURCE_DISPOSED if disposed.
classifyWorklet()
readonlyclassifyWorklet: (input,options?) =>Classification<L>[]
Defined in: extensions/cv/tasks/classification.ts:98
Synchronous version of classify to be executed directly on the caller or worklet thread.
Parameters
input
options?
Returns
Classification<L>[]
dispose()
readonlydispose: () =>void
Defined in: extensions/cv/tasks/classification.ts:76
Releases all allocated native resources.
Returns
void