tensorflow/lite/g3doc/api_docs/java/org/tensorflow/lite/task/vision/classifier/ImageClassifier.ImageClassifierOptions.Builder.html
public static class ImageClassifier.ImageClassifierOptions.Builder
A builder that helps to configure an instance of ImageClassifierOptions.
| ImageClassifier.ImageClassifierOptions | build() | | ImageClassifier.ImageClassifierOptions.Builder | setBaseOptions(BaseOptions baseOptions) Sets the general options to configure Task APIs, such as accelerators.
| | ImageClassifier.ImageClassifierOptions.Builder | setDisplayNamesLocale(String displayNamesLocale) Sets the locale to use for display names specified through the TFLite Model Metadata, if any.
| | ImageClassifier.ImageClassifierOptions.Builder | setLabelAllowList(List<String> labelAllowList) Sets the optional allowlist of labels.
| | ImageClassifier.ImageClassifierOptions.Builder | setLabelDenyList(List<String> labelDenyList) Sets the optional denylist of labels.
| | ImageClassifier.ImageClassifierOptions.Builder | setMaxResults(int maxResults) Sets the maximum number of top scored results to return.
|
| ImageClassifier.ImageClassifierOptions.Builder |
setNumThreads(int numThreads)
This method is deprecated. use BaseOptions to configure number of threads instead. This method will override the number of threads configured from BaseOptions.
| | ImageClassifier.ImageClassifierOptions.Builder | setScoreThreshold(float scoreThreshold) Sets the score threshold.
|
From class java.lang.Object
| boolean | equals(Object arg0) | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |
Sets the general options to configure Task APIs, such as accelerators.
| baseOptions | |
Sets the locale to use for display names specified through the TFLite Model Metadata, if any.
Defaults to English("en"). See the TFLite Metadata schema file. for the accepted pattern of locale.
| displayNamesLocale | |
Sets the optional allowlist of labels.
If non-empty, classifications whose label is not in this set will be filtered out. Duplicate or unknown labels are ignored. Mutually exclusive with labelDenyList.
| labelAllowList | |
Sets the optional denylist of labels.
If non-empty, classifications whose label is in this set will be filtered out. Duplicate or unknown labels are ignored. Mutually exclusive with labelAllowList.
| labelDenyList | |
Sets the maximum number of top scored results to return.
If < 0, all results will be returned. If 0, an invalid argument error is returned. Defaults to -1.
| maxResults | |
| IllegalArgumentException | if maxResults is 0. |
This method is deprecated.
use BaseOptions to configure number of threads instead. This method will override the number of threads configured from BaseOptions.
Sets the number of threads to be used for TFLite ops that support multi-threading when running inference with CPU. Defaults to -1.
numThreads should be greater than 0 or equal to -1. Setting numThreads to -1 has the effect to let TFLite runtime set the value.
| numThreads | |
Sets the score threshold.
It overrides the one provided in the model metadata (if any). Results below this value are rejected.
| scoreThreshold | |