<br />

Performs face landmarks detection on images. This API expects a pre-trained face landmarker model asset bundle.

**Signature:**

    export declare class FaceLandmarker extends VisionTaskRunner 

## Properties

| Property | Modifiers | Type | Description |
|---|---|---|---|
| [FACE_LANDMARKS_LIPS](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_lips) | `static` | Connection\[\] | Landmark connections to draw the connection between a face's lips. |
| [FACE_LANDMARKS_LEFT_EYE](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_left_eye) | `static` | Connection\[\] | Landmark connections to draw the connection between a face's left eye. |
| [FACE_LANDMARKS_LEFT_EYEBROW](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_left_eyebrow) | `static` | Connection\[\] | Landmark connections to draw the connection between a face's left eyebrow. |
| [FACE_LANDMARKS_LEFT_IRIS](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_left_iris) | `static` | Connection\[\] | Landmark connections to draw the connection between a face's left iris. |
| [FACE_LANDMARKS_RIGHT_EYE](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_right_eye) | `static` | Connection\[\] | Landmark connections to draw the connection between a face's right eye. |
| [FACE_LANDMARKS_RIGHT_EYEBROW](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_right_eyebrow) | `static` | Connection\[\] | Landmark connections to draw the connection between a face's right eyebrow. |
| [FACE_LANDMARKS_RIGHT_IRIS](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_right_iris) | `static` | Connection\[\] | Landmark connections to draw the connection between a face's right iris. |
| [FACE_LANDMARKS_FACE_OVAL](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_face_oval) | `static` | Connection\[\] | Landmark connections to draw the face's oval. |
| [FACE_LANDMARKS_CONTOURS](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_contours) | `static` | Connection\[\] | Landmark connections to draw the face's contour. |
| [FACE_LANDMARKS_TESSELATION](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerface_landmarks_tesselation) | `static` | Connection\[\] | Landmark connections to draw the face's tesselation. |

## Methods

| Method | Modifiers | Description |
|---|---|---|
| [createFromOptions(wasmFileset, faceLandmarkerOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkercreatefromoptions) | `static` | Initializes the Wasm runtime and creates a new `FaceLandmarker` from the provided options. |
| [createFromModelBuffer(wasmFileset, modelAssetBuffer)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkercreatefrommodelbuffer) | `static` | Initializes the Wasm runtime and creates a new `FaceLandmarker` based on the provided model asset buffer. |
| [createFromModelPath(wasmFileset, modelAssetPath)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkercreatefrommodelpath) | `static` | Initializes the Wasm runtime and creates a new `FaceLandmarker` based on the path to the model asset. |
| [setOptions(options)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkersetoptions) |   | Sets new options for this `FaceLandmarker`. Calling `setOptions()` with a subset of options only affects those options. You can reset an option back to its default value by explicitly setting it to `undefined`. |
| [detect(image, imageProcessingOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerdetect) |   | Performs face landmarks detection on the provided single image and waits synchronously for the response. Only use this method when the FaceLandmarker is created with running mode `image`. |
| [detectForVideo(videoFrame, timestamp, imageProcessingOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.facelandmarker#facelandmarkerdetectforvideo) |   | Performs face landmarks detection on the provided video frame and waits synchronously for the response. Only use this method when the FaceLandmarker is created with running mode `video`. |

## FaceLandmarker.FACE_LANDMARKS_LIPS {#facelandmarkerface_landmarks_lips}

Landmark connections to draw the connection between a face's lips.

**Signature:**

    static FACE_LANDMARKS_LIPS: Connection[];

## FaceLandmarker.FACE_LANDMARKS_LEFT_EYE {#facelandmarkerface_landmarks_left_eye}

Landmark connections to draw the connection between a face's left eye.

**Signature:**

    static FACE_LANDMARKS_LEFT_EYE: Connection[];

## FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW {#facelandmarkerface_landmarks_left_eyebrow}

Landmark connections to draw the connection between a face's left eyebrow.

**Signature:**

    static FACE_LANDMARKS_LEFT_EYEBROW: Connection[];

## FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS {#facelandmarkerface_landmarks_left_iris}

Landmark connections to draw the connection between a face's left iris.

**Signature:**

    static FACE_LANDMARKS_LEFT_IRIS: Connection[];

## FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE {#facelandmarkerface_landmarks_right_eye}

Landmark connections to draw the connection between a face's right eye.

**Signature:**

    static FACE_LANDMARKS_RIGHT_EYE: Connection[];

## FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW {#facelandmarkerface_landmarks_right_eyebrow}

Landmark connections to draw the connection between a face's right eyebrow.

**Signature:**

    static FACE_LANDMARKS_RIGHT_EYEBROW: Connection[];

## FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS {#facelandmarkerface_landmarks_right_iris}

Landmark connections to draw the connection between a face's right iris.

**Signature:**

    static FACE_LANDMARKS_RIGHT_IRIS: Connection[];

## FaceLandmarker.FACE_LANDMARKS_FACE_OVAL {#facelandmarkerface_landmarks_face_oval}

Landmark connections to draw the face's oval.

**Signature:**

    static FACE_LANDMARKS_FACE_OVAL: Connection[];

## FaceLandmarker.FACE_LANDMARKS_CONTOURS {#facelandmarkerface_landmarks_contours}

Landmark connections to draw the face's contour.

**Signature:**

    static FACE_LANDMARKS_CONTOURS: Connection[];

## FaceLandmarker.FACE_LANDMARKS_TESSELATION {#facelandmarkerface_landmarks_tesselation}

Landmark connections to draw the face's tesselation.

**Signature:**

    static FACE_LANDMARKS_TESSELATION: Connection[];

## FaceLandmarker.createFromOptions() {#facelandmarkercreatefromoptions}

Initializes the Wasm runtime and creates a new `FaceLandmarker` from the provided options.

**Signature:**

    static createFromOptions(wasmFileset: WasmFileset, faceLandmarkerOptions: FaceLandmarkerOptions): Promise<FaceLandmarker>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| wasmFileset | WasmFileset | A configuration object that provides the location of the Wasm binary and its loader. |
| faceLandmarkerOptions | FaceLandmarkerOptions | The options for the FaceLandmarker. Note that either a path to the model asset or a model buffer needs to be provided (via `baseOptions`). |

**Returns:**

Promise\<FaceLandmarker\>

## FaceLandmarker.createFromModelBuffer() {#facelandmarkercreatefrommodelbuffer}

Initializes the Wasm runtime and creates a new `FaceLandmarker` based on the provided model asset buffer.

**Signature:**

    static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<FaceLandmarker>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| wasmFileset | WasmFileset | A configuration object that provides the location of the Wasm binary and its loader. |
| modelAssetBuffer | Uint8Array \| ReadableStreamDefaultReader | An array or a stream containing a binary representation of the model. |

**Returns:**

Promise\<FaceLandmarker\>

## FaceLandmarker.createFromModelPath() {#facelandmarkercreatefrommodelpath}

Initializes the Wasm runtime and creates a new `FaceLandmarker` based on the path to the model asset.

**Signature:**

    static createFromModelPath(wasmFileset: WasmFileset, modelAssetPath: string): Promise<FaceLandmarker>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| wasmFileset | WasmFileset | A configuration object that provides the location of the Wasm binary and its loader. |
| modelAssetPath | string | The path to the model asset. |

**Returns:**

Promise\<FaceLandmarker\>

## FaceLandmarker.setOptions() {#facelandmarkersetoptions}

Sets new options for this `FaceLandmarker`. Calling `setOptions()` with a subset of options only affects those options. You can reset an option back to its default value by explicitly setting it to `undefined`.

**Signature:**

    setOptions(options: FaceLandmarkerOptions): Promise<void>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| options | FaceLandmarkerOptions | The options for the face landmarker. |

**Returns:**

Promise\<void\>

## FaceLandmarker.detect() {#facelandmarkerdetect}

Performs face landmarks detection on the provided single image and waits synchronously for the response. Only use this method when the FaceLandmarker is created with running mode `image`.

**Signature:**

    detect(image: ImageSource, imageProcessingOptions?: ImageProcessingOptions): FaceLandmarkerResult;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| image | ImageSource | An image to process. |
| imageProcessingOptions | ImageProcessingOptions | the `ImageProcessingOptions` specifying how to process the input image before running inference. |

**Returns:**

FaceLandmarkerResult

## FaceLandmarker.detectForVideo() {#facelandmarkerdetectforvideo}

Performs face landmarks detection on the provided video frame and waits synchronously for the response. Only use this method when the FaceLandmarker is created with running mode `video`.

**Signature:**

    detectForVideo(videoFrame: ImageSource, timestamp: number, imageProcessingOptions?: ImageProcessingOptions): FaceLandmarkerResult;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| videoFrame | ImageSource | A video frame to process. |
| timestamp | number | The timestamp of the current frame, in ms. |
| imageProcessingOptions | ImageProcessingOptions | the `ImageProcessingOptions` specifying how to process the input image before running inference. |

**Returns:**

FaceLandmarkerResult