Skip to main content

glider-sleap-nn

Run sleap-nn pose models in GLIDER.

Install this, point GLIDER at the folder sleap-nn wrote, and it converts once and runs. There is nothing to export from the SLEAP GUI beforehand.

uv pip install glider-sleap-nn

Which plugin do I need?

SLEAP has two generations that write entirely different model folders, and no filename is shared between them. Look in the folder your training wrote:

you have that is install
training_config.yaml + best.ckpt sleap-nn (PyTorch) this plugin
training_config.json + best_model.h5 classic SLEAP (TensorFlow) glider-sleap

Not labels.slp in either case — that is the labels file, and there is no network in it.

If you install the wrong one GLIDER says so by name rather than telling you the folder is not a pose model.

What it does

GLIDER runs pose models through onnxruntime, described by a glider_pose.json sidecar next to the model. sleep-nn writes a Lightning checkpoint and a training_config.yaml. This plugin is the bridge.

Pick a model folder in the Camera panel. If it is a sleap-nn folder that has not been converted, GLIDER asks once, converts, and writes model.onnx and glider_pose.json beside the checkpoint. Every later run loads the ONNX directly. Retrain into the same folder and it notices the stamp is stale and offers to convert again — a conversion that quietly answered with the network you just replaced would be the worst outcome available.

It needs sleap-nn, and installs it for you

This is the one real difference from glider-sleap, and it is not arbitrary.

A classic SLEAP model is an ordinary Keras checkpoint. TensorFlow opens it on its own; nothing in sleap is involved. So glider-sleap can depend on tensorflow-cpu directly and convert in-process.

A sleap-nn checkpoint cannot be read that way. Rebuilding the network needs sleap-nn's own Lightning classes, and those bring torch, torchvision and lightning with them — about 1.5 GB.

So this plugin depends on nothing. The first time you select a sleap-nn model it builds a private environment under ~/.glider/envs/sleap-nn with uv, installs sleap-nn into that, and shells into it to convert. GLIDER's own environment is untouched. It is the same arrangement glider-dlc uses, for the same reason.

A lab that already has sleap-nn working can point at it and nothing is downloaded:

export GLIDER_SLEAP_NN_ENV=/path/to/that/venv

What gets exported

The confidence-map module, not sleap-nn's inference wrapper.

sleap-nn's SingleInstanceONNXWrapper is a whole inference graph: uint8 in, decoded peak coordinates out. GLIDER's runner wants confidence maps and does its own peak extraction, so exporting the wrapper would mean teaching GLIDER a second kind of pose model. SingleInstanceLightningModule.forward already returns exactly the confidence maps, so that is what is traced — which also means both SLEAP plugins produce the same artifact and GLIDER cannot tell them apart.

The export itself is sleap-nn's own export_to_onnx, including its numerical parity check against PyTorch. That check is why onnxruntime is installed into the private environment: without it the check silently degrades to a warning, and it is the only thing that catches a graph which traces cleanly and is numerically wrong.

Verified against a real single-instance UNet model (sleap-nn 0.3.3, 7 keypoints, 640×480): the exported ONNX matches the PyTorch module to 1.5e-07, and GLIDER's decode picks the same keypoint pixels as sleap-nn on 20 real frames — 140 of 140 points agreeing exactly.

Scope

Single animal. sleap-nn 0.3.3 ships nine head types; anything other than single_instance is refused by name rather than converted into a network GLIDER would decode as if it tracked one animal.

Python 3.11 to 3.13, the same range GLIDER supports. The private environment pins its own Python, so GLIDER's interpreter does not constrain sleap-nn's.

Metadata

Release files for glider-sleap-nn 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glider-sleap-nn 0.1.0
File Size Uploaded Provenance Actions
glider_sleap_nn-0.1.0.tar.gz 21.4 kB With provenance Details for glider_sleap_nn-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glider-sleap-nn 0.1.0
File Interpreter ABI Platform Actions
glider_sleap_nn-0.1.0-py3-none-any.whl Python 3 none any Details for glider_sleap_nn-0.1.0-py3-none-any.whl

Total release size: 38.3 kB

Release files / glider_sleap_nn-0.1.0.tar.gz

Download URL glider_sleap_nn-0.1.0.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2362dae6bdde18114ca886e1f1067006c6be8306d204fa87110a17229dd099bc
BLAKE2b-256 checksum
How to use checksums
5db405419e0320cdf4e6c2e29379fde388a9e07d024b013a3c1f23e067c32a88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / glider_sleap_nn-0.1.0-py3-none-any.whl

Download URL glider_sleap_nn-0.1.0-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8b9260beeb7231d77bdbb7eb205890cbba595c721bff8eaddc002793f85a8ff
BLAKE2b-256 checksum
How to use checksums
04841a06c6fcf2a38c510e9d9309cb2bfeaeec033cc2eab468c7ce2c0aa2e0c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Security for glider-sleap-nn 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for glider_sleap_nn-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page