dcase_framework.recognizers.BaseRecognizer.find_contiguous_regions

BaseRecognizer.find_contiguous_regions(activity_array)[source]

Find contiguous regions from bool valued numpy.array. Transforms boolean values for each frame into pairs of onsets and offsets.

Parameters:

activity_array : numpy.array [shape=(t)]

Event activity array, bool values

Returns:

change_indices : numpy.ndarray [shape=(2, number of found changes)]

Onset and offset indices pairs in matrix