# ufld

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

## Functions

### 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.

Parameters

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

Returns

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