HolisticLandmarker.HolisticLandmarkerOptions.Builder

public abstract class HolisticLandmarker.HolisticLandmarkerOptions.Builder


Builder for HolisticLandmarkerOptions.

Summary

Public constructors

Public methods

final HolisticLandmarker.HolisticLandmarkerOptions

Validates and builds the HolisticLandmarkerOptions instance.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

Sets the base options for the holistic landmarker task.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

Sets an optional error listener.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

Sets minimum confidence score for the face detection to be considered successful.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

Sets minimum confidence score for the face landmark detection to be considered successful.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

The minimum threshold for the face suppression score in the face detection.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

The minimum confidence score for the hand landmark detection to be considered successful.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

The minimum confidence score for the pose detection to be considered successful.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

The minimum confidence score for the pose landmarks detection to be considered successful.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

The minimum threshold for the pose suppression score in the pose detection.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder
setOutputFaceBlendshapes(boolean value)

Whether to output face blendshapes.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

Whether to output segmentation masks.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

Sets the result listener to receive the detection results asynchronously when the holistic landmarker is in the live stream mode.

abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder

Sets the running mode for the holistic landmarker task.

Public constructors

Builder

public Builder()

Public methods

build

public final HolisticLandmarker.HolisticLandmarkerOptions build()

Validates and builds the HolisticLandmarkerOptions instance.

Throws
java.lang.IllegalArgumentException

if the result listener and the running mode are not properly configured. The result listener should only be set when the holistic landmarker is in the live stream mode.

setBaseOptions

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setBaseOptions(BaseOptions value)

Sets the base options for the holistic landmarker task.

setErrorListener

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setErrorListener(ErrorListener value)

Sets an optional error listener.

setMinFaceDetectionConfidence

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setMinFaceDetectionConfidence(Float value)

Sets minimum confidence score for the face detection to be considered successful. Defaults to 0.5.

setMinFacePresenceConfidence

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setMinFacePresenceConfidence(Float value)

Sets minimum confidence score for the face landmark detection to be considered successful. Defaults to 0.5.

setMinFaceSuppressionThreshold

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setMinFaceSuppressionThreshold(Float value)

The minimum threshold for the face suppression score in the face detection. Defaults to 0.3.

setMinHandLandmarksConfidence

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setMinHandLandmarksConfidence(Float value)

The minimum confidence score for the hand landmark detection to be considered successful. Defaults to 0.5.

setMinPoseDetectionConfidence

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setMinPoseDetectionConfidence(Float value)

The minimum confidence score for the pose detection to be considered successful. Defaults to 0.5.

setMinPosePresenceConfidence

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setMinPosePresenceConfidence(Float value)

The minimum confidence score for the pose landmarks detection to be considered successful. Defaults to 0.5.

setMinPoseSuppressionThreshold

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setMinPoseSuppressionThreshold(Float value)

The minimum threshold for the pose suppression score in the pose detection. Defaults to 0.3.

setOutputFaceBlendshapes

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setOutputFaceBlendshapes(boolean value)

Whether to output face blendshapes. Defaults to false.

setOutputPoseSegmentationMasks

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setOutputPoseSegmentationMasks(boolean value)

Whether to output segmentation masks. Defaults to false.

setResultListener

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setResultListener(
    OutputHandler.ResultListener<HolisticLandmarkerResult, MPImage> value
)

Sets the result listener to receive the detection results asynchronously when the holistic landmarker is in the live stream mode.

setRunningMode

public abstract HolisticLandmarker.HolisticLandmarkerOptions.Builder setRunningMode(RunningMode value)

Sets the running mode for the holistic landmarker task. Defaults to the image mode. Holistic landmarker has three modes:

  • IMAGE: The mode for detecting holistic landmarks on single image inputs.
  • VIDEO: The mode for detecting holistic landmarks on the decoded frames of a video.
  • LIVE_STREAM: The mode for for detecting holistic landmarks on a live stream of input data, such as from camera. In this mode, setResultListener must be called to set up a listener to receive the detection results asynchronously.