FaceMeshDetectorOptions.Builder

public static class FaceMeshDetectorOptions.Builder extends Object

Builder class of FaceMeshDetectorOptions.

Public Constructor Summary

Builder()
Creates a new builder to build FaceMeshDetectorOptions.

Public Method Summary

FaceMeshDetectorOptions
build()
Builds a face mesh detector instance.
FaceMeshDetectorOptions.Builder
setExecutor(Executor executor)
Sets the custom Executor to use.
FaceMeshDetectorOptions.Builder
setUseCase(int useCase)
Sets the use case.

Inherited Method Summary

Public Constructors

public Builder ()

Creates a new builder to build FaceMeshDetectorOptions.

Public Methods

public FaceMeshDetectorOptions build ()

Builds a face mesh detector instance.

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

public FaceMeshDetectorOptions.Builder setUseCase (int useCase)

Sets the use case. By default it is FaceMeshDetectorOptions.FACE_MESH.

When FaceMeshDetectorOptions.BOUNDING_BOX_ONLY is selected, the returned FaceMesh only contains bounding box.

When FaceMeshDetectorOptions.FACE_MESH is selected, the returned FaceMesh contains bounding box as well as 468 FaceMeshPoint and triangle information. It detects at most 2 faces in this case and it is slower than FaceMeshDetectorOptions.BOUNDING_BOX_ONLY.