Options to configure a MediaPipe Classifier Task.
Signature:
export declare interface ClassifierOptions
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| displayNamesLocale | string | undefined | The locale to use for display names specified through the TFLite Model Metadata, if any. Defaults to English. | |
| maxResults | number | undefined | The maximum number of top-scored detection results to return. | |
| scoreThreshold | number | undefined | Overrides the value provided in the model metadata. Results below this value are rejected. | |
| categoryAllowlist | string[] | undefined | Allowlist of category names. If non-empty, detection results whose category name is not in this set will be filtered out. Duplicate or unknown category names are ignored. Mutually exclusive with categoryDenylist. |
|
| categoryDenylist | string[] | undefined | Denylist of category names. If non-empty, detection results whose category name is in this set will be filtered out. Duplicate or unknown category names are ignored. Mutually exclusive with categoryAllowlist. |
ClassifierOptions.displayNamesLocale
The locale to use for display names specified through the TFLite Model Metadata, if any. Defaults to English.
Signature:
displayNamesLocale?: string | undefined;
ClassifierOptions.maxResults
The maximum number of top-scored detection results to return.
Signature:
maxResults?: number | undefined;
ClassifierOptions.scoreThreshold
Overrides the value provided in the model metadata. Results below this value are rejected.
Signature:
scoreThreshold?: number | undefined;
ClassifierOptions.categoryAllowlist
Allowlist of category names. If non-empty, detection results whose category name is not in this set will be filtered out. Duplicate or unknown category names are ignored. Mutually exclusive with categoryDenylist.
Signature:
categoryAllowlist?: string[] | undefined;
ClassifierOptions.categoryDenylist
Denylist of category names. If non-empty, detection results whose category name is in this set will be filtered out. Duplicate or unknown category names are ignored. Mutually exclusive with categoryAllowlist.
Signature:
categoryDenylist?: string[] | undefined;