ImageLabelerOptions.Builder

public static class ImageLabelerOptions.Builder extends Object

Builder of ImageLabelerOptions.

Public Constructor Summary

Builder()
Creates a new builder to build ImageLabelerOptions.

Public Method Summary

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

Inherited Method Summary

Public Constructors

public Builder ()

Creates a new builder to build ImageLabelerOptions.

Default confidenceThreshold is 0.5.

Public Methods

public ImageLabelerOptions build ()

public ImageLabelerOptions.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 ImageLabelerOptions.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