deepof.annotation_utils

Functions and general utilities for supervised pose estimation. See documentation for details.

Functions

augment_with_neighbors(X_huddle[, window, ...])

Expands a given set of features with leading and lagging features on the time axis.

calculate_close_range(df, mouse_id, ...)

Detects for a given set of mouse coordinates if the selected bodypart of the selected mouse is close to any bodypart of any other mouse for each frame.

climb_arena(arena_type, arena, pos_dict, ...)

Return True if the specified mouse is climbing the wall.

close_double_contact(pos_dframe, left1, ...)

Return a boolean array that's True if the specified body parts are closer than tol.

close_single_contact(pos_dframe, left, ...)

Return a boolean array that's True if the specified body parts are closer than tol.

detect_activity(speed_dframe, ...[, ...])

Return true when the mouse is either moving (moving), standing still and either moving (active) or not moving (passive).

digging(speed_dframe, dist_dframe, ...[, ...])

Return true when the mouse is digging.

following_path(distance_dframe, ...[, ...])

Return True if 'follower' is closer than tol to the path that followed has walked over the last specified number of frames.

frame_corners(w, h[, corners])

Return a dictionary with the corner positions of the video frame.

immobility(X_huddle, huddle_estimator[, ...])

Return true when the mouse is huddling a pretrained model.

max_behaviour(behaviour_dframe[, ...])

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

outside_ellipse(x, y, e_center, e_axes, e_angle)

Auxiliar function to climb_wall and sniff_object.

rotate(origin, point, ang)

Auxiliar function to climb_wall and sniff_object.

sniff_around(speed_dframe, ...[, ...])

Return true when the mouse is sniffing around using simple rules.

sniff_object(speed_dframe, arena, pos_dict, ...)

Return True if the specified mouse is sniffing an object.

stationary_lookaround(speed_dframe, ...[, ...])

Return true when the mouse is standing still and looking around (moving nose without head being tilted too much).

supervised_tagging(coord_object, raw_coords, ...)

Output a dataframe with the registered motives per frame.