Neural network backend for training and inference for animal pose estimation.
Project description
sleap-nn
Neural network backend for training and inference for animal pose estimation.
This is the deep learning engine that powers SLEAP (Social LEAP Estimates Animal Poses), providing neural network architectures for multi-instance animal pose estimation and tracking. Built on PyTorch, SLEAP-NN offers an end-to-end training workflow, supporting multiple model types (Single Instance, Top-Down, Bottom-Up, Multi-Class), and seamless integration with SLEAP's GUI and command-line tools.
Need a quick start? Refer to our Quick Start guide in the docs.
Documentation
Documentation - Comprehensive guides and API reference
For development setup
- Clone the sleap-nn repo
git clone https://github.com/talmolab/sleap-nn.git
cd sleap-nn
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- Install sleap-nn dependencies based on your platform\
Python 3.14 is not yet supported
sleap-nncurrently supports Python 3.11, 3.12, and 3.13. Python 3.14 is not yet tested or supported. By default,uvwill use your system-installed Python. If you have Python 3.14 installed, you must specify the Python version (≤3.13) in the install command.For example:
uv sync --python 3.13 ...Replace
...with the rest of your install command as needed.
-
Install everything with a single command.
uv synccreates a.venv(virtual environment) inside your current working directory. This environment is only active within that directory and can't be directly accessed from outside. To use installed packages, run commands withuv run(e.g.,uv run sleap-nn train ...oruv run pytest ...).uv syncThis installs the CUDA 13.0 GPU build on Windows/Linux (x86-64) and the Apple-MPS build on macOS automatically, and
uv runkeeps it. A GPU is not required — the CUDA wheel also runs on CPU.Want the smaller CPU-only wheel (CPU-only machines/CI, Linux aarch64) or a specific CUDA version? Add
--no-group gpu, e.g.uv sync --no-group gpu --extra cpuoruv sync --no-group gpu --extra torch-cuda128.
-
Run tests
uv run pytest tests
-
(Optional) Lint and format code
uv run black --check sleap_nn tests uv run ruff check sleap_nn/
Upgrading All Dependencies To ensure you have the latest versions of all dependencies, use the
--upgradeflag withuv sync:uv sync --upgradeThis will upgrade all installed packages in your environment to the latest available versions compatible with your
pyproject.toml.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sleap_nn-0.3.0.tar.gz.
File metadata
- Download URL: sleap_nn-0.3.0.tar.gz
- Upload date:
- Size: 26.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24fd8bd097caaa385b0b982ce60fe3a1e55b03d820f67e7ced5aa5ea5391ee68
|
|
| MD5 |
8691455d557fe9463ab995b811ca3bb6
|
|
| BLAKE2b-256 |
4fe86884e8fedf9d096bf8f50e7eb3d11bdd1419fe508898786cd3512f3b2af4
|
File details
Details for the file sleap_nn-0.3.0-py3-none-any.whl.
File metadata
- Download URL: sleap_nn-0.3.0-py3-none-any.whl
- Upload date:
- Size: 691.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
209f7390c0c55532ee8ca8d4d4d88cf52d7f856c81147e9ac09ef98e0ce38f70
|
|
| MD5 |
5746ff6ec84ea6c9a304c1c1bc18016a
|
|
| BLAKE2b-256 |
b870400edc608e4714f5235c98378d03e1f3a1c3e56cb611e2606b1035b4bf10
|