from_file#
- movement.io.load_poses.from_file(file, source_software, fps=None, **kwargs)[source]#
Create a
movementposes dataset from any supported file.Deprecated since version 0.14.0: This function is deprecated and will be removed in a future release. Use
movement.io.load_datasetinstead.- Parameters:
file (
Path|str) – Path to the file containing predicted poses. The file format must be among those supported by thefrom_dlc_file(),from_slp_file()orfrom_lp_file()functions. One of these these functions will be called internally, based on the value ofsource_software.source_software (
Literal['DeepLabCut','SLEAP','LightningPose','Anipose','NWB']) – The source software of the file.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”, as the frame rate will be directly read or estimated from metadata in the NWB file.**kwargs – Additional keyword arguments to pass to the software-specific loading functions that are listed under “See Also”.
- Returns:
movementdataset containing the pose tracks, confidence scores, and associated metadata.- Return type:
See also
movement.io.load_poses.from_dlc_file,movement.io.load_poses.from_sleap_file,movement.io.load_poses.from_lp_file,movement.io.load_poses.from_anipose_file,movement.io.load_poses.from_nwb_fileExamples
>>> from movement.io import load_poses >>> ds = load_poses.from_file( ... "path/to/file.h5", source_software="DeepLabCut", fps=30 ... )