vak.transforms.frame_labels.functional.segment_inds_list_from_boundary_labels¶
- vak.transforms.frame_labels.functional.segment_inds_list_from_boundary_labels(boundary_labels: ndarray[tuple[Any, ...], dtype[_ScalarT]], force_boundary_first_ind: bool = True) list[ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]¶
Given an array of boundary labels, return a list of
numpy.ndarrayvectors, each of which can be used to index one segment in a vector of frame 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.
- Returns:
segment_inds_list – Of fancy indexing arrays. Each array can be used to index one segment in
frame_labels.- Return type: