<br />

Performs pose landmarks detection on images.

**Signature:**

```typescript
export declare class PoseLandmarker extends VisionTaskRunner 
```

## Properties

| Property | Modifiers | Type | Description |
|---|---|---|---|
| [POSE_CONNECTIONS](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerpose_connections) | `static` | Connection\[\] | An array containing the pairs of pose landmark indices to be rendered with connections. |

## Methods

| Method | Modifiers | Description |
|---|---|---|
| [createFromOptions(wasmFileset, poseLandmarkerOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkercreatefromoptions) | `static` | Initializes the Wasm runtime and creates a new `PoseLandmarker` from the provided options. |
| [createFromModelBuffer(wasmFileset, modelAssetBuffer)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkercreatefrommodelbuffer) | `static` | Initializes the Wasm runtime and creates a new `PoseLandmarker` based on the provided model asset buffer. |
| [createFromModelPath(wasmFileset, modelAssetPath)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkercreatefrommodelpath) | `static` | Initializes the Wasm runtime and creates a new `PoseLandmarker` based on the path to the model asset. |
| [setOptions(options)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkersetoptions) |   | Sets new options for this `PoseLandmarker`. 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, callback)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetect) |   | Performs pose detection on the provided single image and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `image`. |
| [detect(image, imageProcessingOptions, callback)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetect_1) |   | Performs pose detection on the provided single image and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `image`. |
| [detect(image)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetect_2) |   | Performs pose detection on the provided single image and waits synchronously for the response. This method creates a copy of the resulting masks and should not be used in high-throughput applications. Only use this method when the PoseLandmarker is created with running mode `image`. |
| [detect(image, imageProcessingOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetect_3) |   | Performs pose detection on the provided single image and waits synchronously for the response. This method creates a copy of the resulting masks and should not be used in high-throughput applications. Only use this method when the PoseLandmarker is created with running mode `image`. |
| [detectForVideo(videoFrame, timestamp, callback)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetectforvideo) |   | Performs pose detection on the provided video frame and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `video`. |
| [detectForVideo(videoFrame, timestamp, imageProcessingOptions, callback)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetectforvideo_1) |   | Performs pose detection on the provided video frame and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `video`. |
| [detectForVideo(videoFrame, timestamp)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetectforvideo_2) |   | Performs pose detection on the provided video frame and returns the result. This method creates a copy of the resulting masks and should not be used in high-throughput applications. Only use this method when the PoseLandmarker is created with running mode `video`. |
| [detectForVideo(videoFrame, timestamp, imageProcessingOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.poselandmarker.md.txt#poselandmarkerdetectforvideo_3) |   | Performs pose detection on the provided video frame and returns the result. This method creates a copy of the resulting masks and should not be used in high-throughput applications. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `video`. |

## PoseLandmarker.POSE_CONNECTIONS {#poselandmarkerpose_connections}

An array containing the pairs of pose landmark indices to be rendered with connections.

**Signature:**

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

## PoseLandmarker.createFromOptions() {#poselandmarkercreatefromoptions}

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

**Signature:**

```typescript
static createFromOptions(wasmFileset: WasmFileset, poseLandmarkerOptions: PoseLandmarkerOptions): Promise<PoseLandmarker>;
```

### Parameters

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

**Returns:**

Promise\<PoseLandmarker\>

## PoseLandmarker.createFromModelBuffer() {#poselandmarkercreatefrommodelbuffer}

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

**Signature:**

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

### 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\<PoseLandmarker\>

## PoseLandmarker.createFromModelPath() {#poselandmarkercreatefrommodelpath}

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

**Signature:**

```typescript
static createFromModelPath(wasmFileset: WasmFileset, modelAssetPath: string): Promise<PoseLandmarker>;
```

### 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\<PoseLandmarker\>

## PoseLandmarker.setOptions() {#poselandmarkersetoptions}

Sets new options for this `PoseLandmarker`. 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: PoseLandmarkerOptions): Promise<void>;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| options | PoseLandmarkerOptions | The options for the pose landmarker. |

**Returns:**

Promise\<void\>

## PoseLandmarker.detect() {#poselandmarkerdetect}

Performs pose detection on the provided single image and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `image`.

**Signature:**

```typescript
detect(image: ImageSource, callback: PoseLandmarkerCallback): void;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| image | ImageSource | An image to process. |
| callback | PoseLandmarkerCallback | The callback that is invoked with the result. The lifetime of the returned masks is only guaranteed for the duration of the callback. |

**Returns:**

void

## PoseLandmarker.detect() {#poselandmarkerdetect_1}

Performs pose detection on the provided single image and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `image`.

**Signature:**

```typescript
detect(image: ImageSource, imageProcessingOptions: ImageProcessingOptions, callback: PoseLandmarkerCallback): void;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| image | ImageSource | An image to process. |
| imageProcessingOptions | ImageProcessingOptions | the `ImageProcessingOptions` specifying how to process the input image before running inference. |
| callback | PoseLandmarkerCallback | The callback that is invoked with the result. The lifetime of the returned masks is only guaranteed for the duration of the callback. |

**Returns:**

void

## PoseLandmarker.detect() {#poselandmarkerdetect_2}

Performs pose detection on the provided single image and waits synchronously for the response. This method creates a copy of the resulting masks and should not be used in high-throughput applications. Only use this method when the PoseLandmarker is created with running mode `image`.

**Signature:**

```typescript
detect(image: ImageSource): PoseLandmarkerResult;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| image | ImageSource | An image to process. |

**Returns:**

PoseLandmarkerResult

## PoseLandmarker.detect() {#poselandmarkerdetect_3}

Performs pose detection on the provided single image and waits synchronously for the response. This method creates a copy of the resulting masks and should not be used in high-throughput applications. Only use this method when the PoseLandmarker is created with running mode `image`.

**Signature:**

```typescript
detect(image: ImageSource, imageProcessingOptions: ImageProcessingOptions): PoseLandmarkerResult;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| image | ImageSource | An image to process. |
| imageProcessingOptions | ImageProcessingOptions |   |

**Returns:**

PoseLandmarkerResult

## PoseLandmarker.detectForVideo() {#poselandmarkerdetectforvideo}

Performs pose detection on the provided video frame and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `video`.

**Signature:**

```typescript
detectForVideo(videoFrame: ImageSource, timestamp: number, callback: PoseLandmarkerCallback): void;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| videoFrame | ImageSource | A video frame to process. |
| timestamp | number | The timestamp of the current frame, in ms. |
| callback | PoseLandmarkerCallback | The callback that is invoked with the result. The lifetime of the returned masks is only guaranteed for the duration of the callback. |

**Returns:**

void

## PoseLandmarker.detectForVideo() {#poselandmarkerdetectforvideo_1}

Performs pose detection on the provided video frame and invokes the callback with the response. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `video`.

**Signature:**

```typescript
detectForVideo(videoFrame: ImageSource, timestamp: number, imageProcessingOptions: ImageProcessingOptions, callback: PoseLandmarkerCallback): void;
```

### 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. |
| callback | PoseLandmarkerCallback | The callback that is invoked with the result. The lifetime of the returned masks is only guaranteed for the duration of the callback. |

**Returns:**

void

## PoseLandmarker.detectForVideo() {#poselandmarkerdetectforvideo_2}

Performs pose detection on the provided video frame and returns the result. This method creates a copy of the resulting masks and should not be used in high-throughput applications. Only use this method when the PoseLandmarker is created with running mode `video`.

**Signature:**

```typescript
detectForVideo(videoFrame: ImageSource, timestamp: number): PoseLandmarkerResult;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| videoFrame | ImageSource | A video frame to process. |
| timestamp | number | The timestamp of the current frame, in ms. |

**Returns:**

PoseLandmarkerResult

## PoseLandmarker.detectForVideo() {#poselandmarkerdetectforvideo_3}

Performs pose detection on the provided video frame and returns the result. This method creates a copy of the resulting masks and should not be used in high-throughput applications. The method returns synchronously once the callback returns. Only use this method when the PoseLandmarker is created with running mode `video`.

**Signature:**

```typescript
detectForVideo(videoFrame: ImageSource, timestamp: number, imageProcessingOptions: ImageProcessingOptions): PoseLandmarkerResult;
```

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

PoseLandmarkerResult