deepof.utils.load_table
- deepof.utils.load_table(tab: str, table_path: str, table_format: str, rename_bodyparts_dict: dict | None = None, animal_ids: list | None = None)
Loads a table into a structured pandas data frame.
Supports inputs from both DeepLabCut and (S)LEAP.
- Parameters:
tab (str) – Name of the file containing the tracks.
table_path (string) – Full path to the file containing the tracks.
table_format (str) – type of the files to load, coming from either DeepLabCut (CSV and H5) and (S)LEAP (NPY).
rename_bodyparts_dict (dict) – dictionary of bodypart names given in the table corresponding to deepOFs bodypart names.
animal_ids (list) – List with the animal ids in case of multiple tracked animals. Is expected to be None if there is only a single animal getting tracked.
- Returns:
Data frame containing the loaded tracks. Likelihood for (S)LEAP files is imputed as 1.0 (tracked values) or 0.0 (missing values).
- Return type:
loaded_tab (pd.DataFrame)