Pose-estimation data processors

Reset pose

class simba.pose_processors.pose_reset.PoseResetter(master: Optional[Toplevel] = None)[source]

Bases: object

Launch GUI for deleting all user-defined pose-estimation schematics, diagrams and other settings from the SimBA installation.

Parameters

master (Optional[TopLevel]) – Tkinter TopLevel window. Default: None.

Examples

>>> _ = PoseResetter(master=None)

Remove key-points

class simba.pose_processors.remove_keypoints.KeypointRemover(data_folder: str, pose_tool: str, file_format: str)[source]

Bases: object

Remove pose-estimated keypoints from data in CSV or H5 format.

Parameters
  • data_folder (str) – Path to directory containing pose-estiation CSV or H5 data

  • file_format (str) – File type of pose-estimation data.

  • pose_tool (str) – Tool used to perform pose-estimation. E.g., DLC or maDLC

GitHub tutorial/documentation.

Examples

>>> keypoint_remover = KeypointRemover(data_folder="MyDataFolder", pose_tool='maDLC', file_format='h5')
>>> keypoint_remover.run(bp_to_remove_list=['Nose_1, Nose_2'])

Re-organize key-points

class simba.pose_processors.reorganize_keypoint.KeypointReorganizer(data_folder: str, pose_tool: str, file_format: Optional[str] = None)[source]

Bases: object

Re-organizing the order of pose-estimated keypoints in directory containing CSV or H5 format files.

Parameters
  • data_folder (str) – Path to directory containing pose-estiation CSV or H5 data

  • pose_tool (str) – Tool used to perform pose-estimation. E.g., ‘DLC’ or ‘maDLC’.

  • file_format (str) – File type of pose-estimation data.

Examples

>>> keypoint_reorganizer = KeypointReorganizer(data_folder="test_data/misc_test_files", pose_tool='maDLC', file_format='h5')
>>> keypoint_reorganizer.run(animal_list=['UM', 'LM', 'LM', 'UM', 'LM', 'UM', 'LM', 'LM', 'UM', 'LM', 'UM', 'UM', 'UM', 'UM', 'LM', 'LM'], bp_lst=['Lateral_left', 'Nose', 'Tail_base', 'Lateral_right', 'Ear_right', 'Center', 'Nose', 'Ear_left', 'Ear_right', 'Center', 'Tail_end', 'Ear_left', 'Tail_base', 'Lateral_left', 'Tail_end', 'Lateral_right'])
>>> keypoint_reorganizer = KeypointReorganizer(data_folder="test_data/misc_test_files", pose_tool='DLC', file_format='csv')
>>> keypoint_reorganizer.run(bp_lst=['Ear_left_1', 'Ear_right_1', 'Nose_1', 'Center_1', 'Lateral_left_1', 'Lateral_right_1', 'Tail_base_1', 'Ear_left_2', 'Ear_right_2', 'Nose_2', 'Center_2', 'Lateral_left_2', 'Lateral_right_2', 'Tail_base_2'], animal_list=None)

Reverse pose