vak.transforms.frame_labels.functional.boundary_inds_from_boundary_labels

vak.transforms.frame_labels.functional.boundary_inds_from_boundary_labels(boundary_labels: ndarray[Any, dtype[_ScalarType_co]], force_boundary_first_ind: bool = True) ndarray[Any, dtype[_ScalarType_co]][source]

Return a numpy.ndarray with the indices of boundaries, given a 1-D vector of boundary labels.

Parameters:
  • boundary_labels (numpy.ndarray) – Vector of integers {0, 1}, where 1 indicates a boundary, and 0 indicates 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 of boundary_labels is not classified as a boundary, force it to be a boundary.