# lane_detection

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

## Functions

### compute_lane_detection_points

```python
def compute_lane_detection_points(tensor: np.ndarray, *, row_anchors: list[int], griding_num: int, cls_num_per_lane: int, input_size: tuple[int, int]) -> list[list[tuple[int, int]]]:
```

Decode UFLD lane points from a batched grid tensor.

Parameters

 * `tensor` (`np.ndarray`): Batched logits with grid classes, sampled rows, and lanes as the remaining axes; only the first batch
   item is used.
 * `row_anchors` (`list[int]`): Image row positions, in pixels, for the lane sampling grid.
 * `griding_num` (`int`): Number of horizontal grid cells, excluding the no-lane class.
 * `cls_num_per_lane` (`int`): Number of sampled row positions per lane.
 * `input_size` (`tuple[int, int]`): Model input size as `(width, height)`.

Returns

 * `list[list[tuple[int, int]]]`: One list per lane containing normalized XY point tuples. Lanes with fewer than three valid
   samples have empty lists.
