# ufld

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

## Functions

| Name | Description |
| --- | --- |
| [`decode_ufld`](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/node/parsers/utils/ufld.md#ufld-Functions-decode_ufld) | Decode a UFLD grid into normalized lane points. |

### function `decode_ufld`

```python
def decode_ufld(
    anchors: list[int],
    griding_num: int,
    cls_num_per_lane: int,
    input_width: int,
    input_height: int,
    y: np.ndarray,
) -> list[list[tuple[int, int]]]
```

Decode a UFLD grid into normalized lane points.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `anchors` | `list[int]` | Row anchor positions in image pixels. | required |
| `griding_num` | `int` | Number of horizontal grid classes, excluding the no-lane class. | required |
| `cls_num_per_lane` | `int` | Number of row anchors per lane. | required |
| `input_width` | `int` | Image width used to normalize X coordinates. | required |
| `input_height` | `int` | Image height used to normalize Y coordinates. | required |
| `y` | `np.ndarray` | Unbatched logits with axes `(grid_classes, row_anchors, lanes)`. | required |

Returns

| Type | Description |
| --- | --- |
| `list[list[tuple[int, int]]]` | One list of normalized XY tuples per lane. Lanes with fewer than three valid sampled positions are empty. |
