deepof.data.load_project

deepof.data.load_project(project_path: str, animal_ids: List | None = None, arena: str = 'polygonal-autodetect', bodypart_graph: str | dict = 'deepof_14', iterative_imputation: str = 'partial', exclude_bodyparts: List = ('',), exp_conditions: dict | None = None, remove_outliers: bool = True, interpolation_limit: int = 5, interpolation_std: int = 3, likelihood_tol: float = 0.75, model: str = 'mouse_topview', project_name: str = 'deepof_project', video_path: str | None = None, table_path: str | None = None, rename_bodyparts: list | None = None, sam_checkpoint_path: str | None = None, smooth_alpha: float = 1, table_format: str = 'autodetect', video_format: str = '.mp4', video_scale: int = 1, number_of_rois=0, fast_implementations_threshold: int = 50000) deepof_coordinates

Load a pre-saved pickled Coordinates object. Will update Coordinate objects from older versions of deepof (down to 0.7) to work with this version. Very old projects will be recreated during loading with the current version of Deepof. For this purpose input arguments can be set just as in a recular project definition.

Parameters:
  • animal_ids (list) – list of animal ids.

  • arena (str) – arena type. Can be one of “circular-autodetect”, “circular-manual”, “polygonal-autodetect”, or “polygonal-manual”.

  • bodypart_graph (str) – body part scheme to use for the analysis. Defaults to None, in which case the program will attempt to select it automatically based on the available body parts.

  • iterative_imputation (str) – whether to use iterative imputation for occluded body parts, options are “full” and “partial”. if set to None, no imputation takes place.

  • exclude_bodyparts (list) – list of bodyparts to exclude from analysis.

  • exp_conditions (dict) – dictionary with experiment IDs as keys and experimental conditions as values.

  • remove_outliers (bool) – whether outliers should be removed during project creation.

  • interpolation_limit (int) – maximum number of missing frames to interpolate.

  • interpolation_std (int) – maximum number of standard deviations to interpolate.

  • likelihood_tol (float) – likelihood threshold for outlier detection.

  • model (str) – model to use for pose estimation. Defaults to ‘mouse_topview’ (as described in the documentation).

  • project_name (str) – name of the current project.

  • project_path (str) – path to the folder containing the motion tracking output data.

  • video_path (str) – path where to find the videos to use. If not specified, deepof, assumes they are in your project path.

  • table_path (str) – path where to find the tracks to use. If not specified, deepof, assumes they are in your project path.

  • rename_bodyparts (list) – list of names to use for the body parts in the provided tracking files. The order should match that of the columns in your DLC tables or the node dimensions on your (S)LEAP .npy files.

  • sam_checkpoint_path (str) – path to the checkpoint file for the SAM model. If not specified, the model will be saved in the installation folder.

  • smooth_alpha (float) – smoothing intensity. The higher the value, the more smoothing.

  • table_format (str) – format of the table. Defaults to ‘autodetect’, but can be set to “csv” or “h5” for DLC output, and “npy”, “slp” or “analysis.h5” for (S)LEAP.

  • video_format (str) – video format. Defaults to ‘.mp4’.

  • video_scale (int) – diameter of the arena in mm (if the arena is round) or length of the first specified arena side (if the arena is polygonal).

  • number_of_rois (int) – number of behavior rois to be drawn during project creation, default = 0,

  • fast_implementations_threshold (int) – If the total number of frames in the project is larger than this, numba implementations of all functions with a numba option will be used.

Returns:

Pre-run coordinates object.

Return type:

coordinates (deepof_coordinates)