deepof.annotation_utils.max_behaviour

deepof.annotation_utils.max_behaviour(behaviour_dframe: DataFrame, window_size: int = 10, stepped: bool = False) array

Return the most frequent behaviour in a window of window_size frames.

Parameters:
  • behaviour_dframe (pd.DataFrame) – boolean matrix containing occurrence of tagged behaviours per frame in the video

  • window_size (int) – size of the window to use when computing the maximum behaviour per time slot

  • stepped (bool) – sliding windows don’t overlap if True. False by default

Returns:

string array with the most common behaviour per instance of the sliding window

Return type:

max_array (np.array)