load_dataset#
- movement.io.load.load_dataset(file, source_software='auto', fps=None, **kwargs)[source]#
Create a
movementdataset from any supported file format.- Parameters:
file (
Path|str|NWBFile) – Path to a file containing pose or bounding box tracks, in one of the supported formats. Ifsource_softwareis “NWB”, this can also be apynwb.file.NWBFileobject.source_software (
Literal['DeepLabCut','SLEAP','LightningPose','Anipose','NWB','VIA-tracks','COCO','movement'] |Literal['auto','DeepLabCut/LightningPose']) – The source software of the file. If set to"auto"(default), it is inferred from the file format viainfer_source_software(). Useget_supported_source_software()to list all registered source software names and their supported file suffixes.fps (
float|None) – The number of frames per second in the video. If None (default), thetimecoordinates will be in frame numbers. This argument is ignored whensource_softwareis “NWB” or “movement”, as the frame rate will be directly read or estimated from metadata in the file.**kwargs – Additional keyword arguments passed to the format-specific loader in
movement.io.load_posesormovement.io.load_bboxes, or toxarray.load_dataset()formovementnetCDF files.
- Returns:
movementdataset containing the pose or bounding box tracks, confidence scores, and associated metadata.- Return type:
See also
load_multiview_datasetLoad and merge data from multiple views.
movement.io.save.save_datasetSave a
movementdataset to a file.
Examples
>>> from movement.io import load_dataset >>> ds = load_dataset( ... "path/to/file.h5", source_software="DeepLabCut", fps=30 ... )