to_dlc_style_df#
- movement.io.save_poses.to_dlc_style_df(ds, split_individuals=False)[source]#
Convert a
movementdataset to DeepLabCut-style DataFrame(s).- Parameters:
ds (xarray.Dataset) –
movementdataset containing pose tracks, confidence scores, and associated metadata.split_individuals (bool, optional) – If True, return a dictionary of DataFrames per individual, with individual names as keys. If False (default), return a single DataFrame for all individuals (see Notes).
- Returns:
DeepLabCut-style pandas DataFrame or dictionary of DataFrames.
- Return type:
Notes
The DataFrame(s) will have a multi-index column with the following levels: “scorer”, “bodyparts”, “coords” (if split_individuals is True), or “scorer”, “individuals”, “bodyparts”, “coords” (if split_individuals is False).
For 2D data, regardless of the provenance of the points-wise confidence scores, they will be referred to as “likelihood”, and stored in the “coords” level as DeepLabCut expects.
For 3D data, the “coords” level will only contain “x”, “y”, and “z”, as DeepLabCut does not currently provide 3D likelihoods.
See also
to_dlc_fileSave dataset directly to a DeepLabCut-style .h5 or .csv file.