Skip to main content

Neural network backend for training and inference for animal pose estimation.

Project description

sleap-nn

CI codecov Release PyPI PyPI - Python Version

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

  1. Clone the sleap-nn repo
git clone https://github.com/talmolab/sleap-nn.git
cd sleap-nn
  1. Install uv Install uv first - a fast Python package manager:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
  1. Install sleap-nn dependencies based on your platform\
  • Sync all dependencies based on your correct wheel using uv sync. uv sync creates 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 all installed packages, you must run commands with uv run (e.g., uv run sleap-nn train ... or uv run pytest ...).

    • Windows/Linux with NVIDIA GPU (CUDA 11.8):
    uv sync --extra dev --extra torch-cuda118
    
    • Windows/Linux with NVIDIA GPU (CUDA 12.8):
    uv sync --extra dev --extra torch-cuda128
    
    • macOS with Apple Silicon (M1, M2, M3, M4) or CPU-only (no GPU or unsupported GPU): Note: Even if torch-cpu is used on macOS, the MPS backend will be available.
    uv sync --extra dev --extra torch-cpu
    
  1. Run tests

    uv run pytest tests
    
  2. (Optional) Lint and format code

    uv run black --check sleap_nn tests
    uv run ruff check sleap_nn/
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sleap_nn-0.0.2.tar.gz (18.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sleap_nn-0.0.2-py3-none-any.whl (216.7 kB view details)

Uploaded Python 3

File details

Details for the file sleap_nn-0.0.2.tar.gz.

File metadata

  • Download URL: sleap_nn-0.0.2.tar.gz
  • Upload date:
  • Size: 18.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.22

File hashes

Hashes for sleap_nn-0.0.2.tar.gz
Algorithm Hash digest
SHA256 19a168b00551b23d9e7ba2a7ba27921f901bea35c465878c853173166cacdfc7
MD5 765c7859d107682e58ea23cf83a43b59
BLAKE2b-256 3dd3165f56fb5f96d19e796bb23ab7ea413e2b70001e0440cb0dd4193ff17acd

See more details on using hashes here.

File details

Details for the file sleap_nn-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sleap_nn-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 216.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.22

File hashes

Hashes for sleap_nn-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 83fd35bdd034fd052c234bd9086f2c86a8afb4b936a780d68a687e8a8b747ab4
MD5 4fe749b396bf1f982194dc5121c43c35
BLAKE2b-256 3bd3253233eefbc00832fc5a29ad502dabf151bed05455bbcae680183354b891

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page