AutoMLImageLabelerOptions.Builder

public static class AutoMLImageLabelerOptions.Builder extends Object

Public Constructor Summary

Public Method Summary

AutoMLImageLabelerOptions
AutoMLImageLabelerOptions.Builder
setConfidenceThreshold(float confidenceThreshold)
Sets confidence threshold of detected labels.
AutoMLImageLabelerOptions.Builder
setExecutor(Executor executor)
Sets the custom Executor to use.

Inherited Method Summary

Public Constructors

public AutoMLImageLabelerOptions.Builder (AutoMLImageLabelerLocalModel localModel)

Creates a new builder to build AutoMLImageLabelerOptions with a local model AutoMLImageLabelerLocalModel.

Default confidenceThreshold is 0.5.

public AutoMLImageLabelerOptions.Builder (AutoMLImageLabelerRemoteModel remoteModel)

Creates a new builder to build AutoMLImageLabelerOptions with a remote model AutoMLImageLabelerRemoteModel.

Default confidenceThreshold is 0.5.

Public Methods

public AutoMLImageLabelerOptions build ()

public AutoMLImageLabelerOptions.Builder setConfidenceThreshold (float confidenceThreshold)

Sets confidence threshold of detected labels. Only labels detected with confidence higher than this threshold are returned.

Default is 0.5.

Throws
IllegalArgumentException if the confidenceThreshold is out of the range [0.0f, 1.0f].

public AutoMLImageLabelerOptions.Builder setExecutor (Executor executor)

Sets the custom Executor to use. If no Executor is set, an internal background thread pool will be used.

Most clients should not need to call this method.

Parameters
executor the Executor to use
Returns
  • this object, for chaining method calls