from_file#

movement.io.load_poses.from_file(file, source_software, fps=None, **kwargs)[source]#

Create a movement poses 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_dataset instead.

Parameters:
  • file (Path | str) – Path to the file containing predicted poses. The file format must be among those supported by the from_dlc_file(), from_slp_file() or from_lp_file() functions. One of these these functions will be called internally, based on the value of source_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), the time coordinates will be in frame numbers. This argument is ignored when source_software is “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:

movement dataset containing the pose tracks, confidence scores, and associated metadata.

Return type:

Dataset

Examples

>>> from movement.io import load_poses
>>> ds = load_poses.from_file(
...     "path/to/file.h5", source_software="DeepLabCut", fps=30
... )