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.