AI-generated Key Takeaways
-
CustomImageLabelerOptions.Builder is used to build CustomImageLabelerOptions.
-
It can be initialized with either a LocalModel or a CustomRemoteModel.
-
The builder provides methods to set confidence threshold, executor, and maximum result count.
-
The build() method returns the constructed CustomImageLabelerOptions object.
Builder of CustomImageLabelerOptions.
Public Constructor Summary
|
Builder(LocalModel localModel)
Creates a new builder to build
CustomImageLabelerOptions with LocalModel.
|
|
|
Builder(CustomRemoteModel remoteModel)
Creates a new builder to build
CustomImageLabelerOptions with CustomRemoteModel.
|
Public Method Summary
| CustomImageLabelerOptions |
build()
|
| CustomImageLabelerOptions.Builder |
setConfidenceThreshold(float confidenceThreshold)
Sets confidence threshold of detected labels.
|
| CustomImageLabelerOptions.Builder | |
| CustomImageLabelerOptions.Builder |
setMaxResultCount(int maxResultCount)
Sets the maximum number of results that the image labeler will return.
|
Inherited Method Summary
Public Constructors
public Builder (LocalModel localModel)
Creates a new builder to build
CustomImageLabelerOptions with LocalModel.
public Builder (CustomRemoteModel remoteModel)
Creates a new builder to build
CustomImageLabelerOptions with CustomRemoteModel.
Public Methods
public CustomImageLabelerOptions build ()
public CustomImageLabelerOptions.Builder setConfidenceThreshold (float confidenceThreshold)
Sets confidence threshold of detected labels. Only labels detected with confidence higher than this threshold are returned.
The default value will be read from model metadata. If not presented, will use 0.
Throws
| IllegalArgumentException | if the confidenceThreshold is out of the range [0.0f, 1.0f]. |
|---|
public CustomImageLabelerOptions.Builder setExecutor (Executor executor)
public CustomImageLabelerOptions.Builder setMaxResultCount (int maxResultCount)
Sets the maximum number of results that the image labeler will return.