Reads DeepLabCut (DLC) pose estimation output from CSV or HDF5 format and returns a PhysioExperiment object with keypoint coordinates and confidence scores.
Usage
readDeepLabCut(path, fps = 30, format = c("csv", "h5"))Value
A PhysioExperiment with assays:
- keypoint_x
X coordinates matrix (frames x bodyparts)
- keypoint_y
Y coordinates matrix (frames x bodyparts)
- confidence
Detection likelihood matrix (frames x bodyparts)
The colData contains columns label (bodypart names), type
("keypoint"), and scorer (the DLC scorer/model name).
The metadata list contains dlc_scorer, format, and source_file.
Details
DeepLabCut outputs pose estimation results in CSV or HDF5 format.
CSV format has a 3-row multi-level header:
Row 1: scorer name (the DLC model name)
Row 2: bodypart names
Row 3: coordinate type (x, y, likelihood)
Followed by numeric data where each row is a frame and columns are
grouped as [x, y, likelihood] triplets per bodypart.
H5 format stores data in a hierarchical HDF5 structure under
df_with_missing/table. Requires the rhdf5 package.
References
Mathis A, Mamidanna P, Cury KM, Abe T, Murthy VN, Mathis MW, Bethge M (2018). "DeepLabCut: markerless pose estimation of user-defined body parts with deep learning." Nature Neuroscience, 21(9), 1281-1289.