from_dlc_style_df#
- movement.io.load_poses.from_dlc_style_df(df, fps=None, source_software='DeepLabCut')[source]#
Create a
movementposes dataset from a DeepLabCut-style DataFrame.- Parameters:
df (pandas.DataFrame) – DataFrame containing the pose tracks and confidence scores. Must be formatted as in DeepLabCut output files (see Notes).
fps (float, optional) – The number of frames per second in the video. If None (default), the
timecoordinates will be in frame numbers.source_software (str, optional) – Name of the pose estimation software from which the data originate. Defaults to “DeepLabCut”, but it can also be “LightningPose” (because they use the same DataFrame format).
- Returns:
movementdataset containing the pose tracks, confidence scores, and associated metadata.- Return type:
Notes
The DataFrame must have a multi-index column with the following levels: “scorer”, (“individuals”), “bodyparts”, “coords”. The “individuals” level may be omitted if there is only one individual in the video. The “coords” level contains either:
the spatial coordinates “x”, “y”, and “likelihood” (point-wise confidence scores), or
the spatial coordinates “x”, “y”, and “z” (3D poses estimated by triangulating 2D poses from multiple DeepLabCut output files).
The row index corresponds to the frame number.
See also