vak.transforms.frame_labels.functional.boundary_inds_from_boundary_labels¶
- vak.transforms.frame_labels.functional.boundary_inds_from_boundary_labels(boundary_labels: ndarray[tuple[Any, ...], dtype[_ScalarT]], force_boundary_first_ind: bool = True) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]¶
Return a
numpy.ndarraywith the indices of boundaries, given a 1-D vector of boundary labels.- Parameters:
boundary_labels (numpy.ndarray) – Vector of integers
{0, 1}, where1indicates a boundary, and0indicates no boundary. Output of a frame classification model trained to classify each frame as “boundary” or “no boundary”.force_boundary_first_ind (bool) – If
True, and the first index ofboundary_labelsis not classified as a boundary, force it to be a boundary.