sleap-io¶
Standalone utilities for working with animal pose tracking data.
This is intended to be a complement to the core SLEAP package that aims to provide functionality for interacting with pose tracking-related data structures and file formats with minimal dependencies. This package does not have any functionality related to labeling, training, or inference.
Features¶
The main purpose of this library is to provide utilities to load/save from different formats for pose data and standardize them into our common Data Model.
- Read/write labels in SLP, NWB, DeepLabCut, JABS, LabelStudio and Ultralytics YOLO formats.
- Support for LabelsSet to manage multiple dataset splits (train/val/test) and export to different formats.
- Read videos in any format, work them in a numpy-like interface whether the video files are accessible or not, and easily save them out.
This enables ease-of-use through format-agnostic operations that make it easy to work with pose data, including utilities for common tasks. Some of these include:
- Create labels from a custom format
- Convert labels to numpy arrays for analysis
- Fix video paths in the labels
- Make training/validation/test splits
- Work with dataset splits using LabelsSet
- Replace a skeleton
See Examples for more usage examples and recipes.
Installation¶
From PyPI¶
or
From source (latest version)¶
Optional Dependencies¶
For video backend support, install with extras:
pip install sleap-io[opencv] # For OpenCV backend
pip install sleap-io[av] # For PyAV backend
pip install sleap-io[all] # For all video backends
Development Installation¶
For development, use one of the following:
Support¶
For technical inquiries specific to this package, please open an Issue with a description of your problem or request.
For general SLEAP usage, see the main website.
Other questions? Reach out to talmo@salk.edu
.
License¶
This package is distributed under a BSD 3-Clause License and can be used without
restrictions. See LICENSE
for details.