PoseDetectorOptions.Builder

public static class PoseDetectorOptions.Builder extends Object

Builder for PoseDetectorOptions.

Public Constructor Summary

Public Method Summary

PoseDetectorOptions
PoseDetectorOptions.Builder
setDetectorMode(int detectorMode)
Set the detector mode to be used, depending on what kind of input is being processed.
PoseDetectorOptions.Builder
setExecutor(Executor executor)
Sets the custom Executor to use.
PoseDetectorOptions.Builder
setPerformanceMode(int performanceMode)
Sets performance mode to indicate a preference between speed and accuracy.

Inherited Method Summary

Public Constructors

public PoseDetectorOptions.Builder ()

Public Methods

public PoseDetectorOptions build ()

public PoseDetectorOptions.Builder setDetectorMode (int detectorMode)

Set the detector mode to be used, depending on what kind of input is being processed. The process(InputImage) call will treat the inputs differently based on this mode.

Default: STREAM_MODE

Use STREAM_MODE for input frames consisting of related images, for example, frames from a user's camera. This mode uses tracking, which provides a speed-up when the frames consists of related images without much of a scene change.

Use SINGLE_IMAGE_MODE for a single still image, or when the input frames are unrelated.

Parameters
detectorMode the detector mode used, depending on what kind of input is being processed. One of STREAM_MODE or SINGLE_IMAGE_MODE.

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

public PoseDetectorOptions.Builder setPerformanceMode (int performanceMode)

Sets performance mode to indicate a preference between speed and accuracy.

Default: PERFORMANCE_MODE_FAST

Use PERFORMANCE_MODE_FAST when faster detection is preferred, potentially at the cost of accuracy.

Use PERFORMANCE_MODE_ACCURATE when detection accuracy is a priority, potentially at the cost of higher latency.

Parameters
performanceMode the performance mode used, depending on whether speed or accuracy is of higher priority. One of PERFORMANCE_MODE_FAST or PERFORMANCE_MODE_ACCURATE.