# hrnet

Python API: `depthai_nodes.node.parsers.utils.hrnet`

## Functions

| Name | Description |
| --- | --- |
| [`compute_hrnet_keypoints`](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/node/parsers/utils/hrnet.md#hrnet-Functions-compute_hrnet_keypoints) | Find each HRNet heatmap maximum and normalize its coordinates. |

### function `compute_hrnet_keypoints`

```python
def compute_hrnet_keypoints(heatmaps: np.ndarray) -> tuple[np.ndarray, np.ndarray]
```

Find each HRNet heatmap maximum and normalize its coordinates.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `heatmaps` | `np.ndarray` | Heatmaps of shape `(1, keypoints, height, width)` or `(keypoints, height, width)`. The first axis is removed when its size is 1. | required |

Returns

| Type | Description |
| --- | --- |
| `tuple[np.ndarray, np.ndarray]` | A pair of normalized `(N, 2)` XY coordinates and `(N,)` peak scores clipped to [0, 1]. |

Raises

| Type | Description |
| --- | --- |
| `ValueError` | If the heatmaps are not 3D after removal of a singleton first axis. |
