<br />

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

**Signature:**

```typescript
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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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.md.txt#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

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

**Signature:**

```typescript
static FACE_LANDMARKS_LIPS: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_LEFT_EYE

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

**Signature:**

```typescript
static FACE_LANDMARKS_LEFT_EYE: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW

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

**Signature:**

```typescript
static FACE_LANDMARKS_LEFT_EYEBROW: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS

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

**Signature:**

```typescript
static FACE_LANDMARKS_LEFT_IRIS: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE

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

**Signature:**

```typescript
static FACE_LANDMARKS_RIGHT_EYE: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW

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

**Signature:**

```typescript
static FACE_LANDMARKS_RIGHT_EYEBROW: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS

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

**Signature:**

```typescript
static FACE_LANDMARKS_RIGHT_IRIS: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_FACE_OVAL

Landmark connections to draw the face's oval.

**Signature:**

```typescript
static FACE_LANDMARKS_FACE_OVAL: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_CONTOURS

Landmark connections to draw the face's contour.

**Signature:**

```typescript
static FACE_LANDMARKS_CONTOURS: Connection[];
```

## FaceLandmarker.FACE_LANDMARKS_TESSELATION

Landmark connections to draw the face's tesselation.

**Signature:**

```typescript
static FACE_LANDMARKS_TESSELATION: Connection[];
```

## FaceLandmarker.createFromOptions()

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

**Signature:**

```typescript
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()

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

**Signature:**

```typescript
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()

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

**Signature:**

```typescript
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()

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:**

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

### Parameters

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

**Returns:**

Promise\<void\>

## FaceLandmarker.detect()

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:**

```typescript
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()

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:**

```typescript
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