deepof.utils.extend_behaviors_numba

deepof.utils.extend_behaviors_numba(behaviors: ndarray, delta_T: float = 2.0, frame_rate: float = 1) ndarray

Takes a booelan array of behavior detections and extends each behavior detection by delta_T.

Parameters:
  • behaviors (np.ndarray) – Boolean array of shape [N_behaviors, N_frames] containing the detection results (True / False) of each behavior for each frame.

  • delta_T – Time by which each behavior should be expanded

  • frame_rate (float) – Frame rate of the corresponding project

Returns:

Boolean array of shape [N_behaviors, N_frames] containing the detection results (True / False) of each behavior for each frame after extension.

Return type:

extended_behaviors (np.ndarray)