Skip to content

SLEAP v1.6.6

Latest

Choose a tag to compare

@gitttt-1234 gitttt-1234 released this 20 Oct 17:39
· 2 commits to develop since this release
d24a98f

SLEAP v1.6.6

SLEAP v1.6.6 is a GUI-focused maintenance release. Run Inference now behaves the way the dialog says it does: "Entire video" predicts every frame, "Skip user labeled frames" really skips them, tracking-only works, and five tracking/inference settings that were silently ignored or misapplied (max scoring, single-node OKS, tracking-only targets, duplicate instances, Accelerator) are now sent correctly. Training-dialog augmentation "Off" now really turns augmentation off, and hidden settings from a selected config are kept. Also new: a progress bar for Generate Suggestions, batch removal of suggestions, and negative frames counted as labeled — plus a dozen smaller GUI fixes and updated dependencies (sleap-io 0.9.3 and sleap-nn 0.3.4, which adds appearance-embedding re-identification and fixes AV1 video reading on Linux).

Quick install/upgrade:

uv tool install --python 3.13 "sleap[nn]==1.6.6" --torch-backend auto

See the v1.6.0 release notes for full details on the latest major release.


New Features

Progress bar for Generate Suggestions (#2867)

Predict → Generate Suggestions now shows a real progress bar ("Generating suggested frames... (3/20 videos)") instead of a busy spinner, for every suggestion method. On large projects this job can take 35–40 minutes, so you can now see that it is moving. Scripting users can pass the new optional progress_callback parameter.

Remove several suggestions at once (#2871)

Shift/Ctrl-click multiple rows in the Labeling Suggestions table and click Remove to delete them all. Removal is correct even when the table is sorted, and the selection moves to a neighboring row so you can keep pruning.

Negative frames count as labeled (#2894)

Frames marked as negative ("no animals here") are deliberate labels, and the GUI now treats them that way: the status bar counts them (Labeled Frames: 6 (2 negative frames)), the Suggestions table shows negative and includes them in N/M labeled, and Go → Next/Previous User Labeled Frame stops on them. This is display and navigation only; .slp files are unchanged.


CLI Updates

Document that --frames is 0-based (#2880)

The GUI numbers frames from 1, but --frames in sleap-track and sleap-render takes 0-based indices, so --frames 1-100 skipped the GUI's first frame. The --help text and CLI reference docs now say so, with 0-99 examples. No behavior change.


Bug Fixes

"Entire video", "Skip user labeled frames" and tracking-only inference work as expected (#2848, #2893)

"Run Inference → Entire video" (and clip, current frame, all videos, random sample) only predicted frames already saved in the project — e.g. 20 frames of a 1500-frame video. These targets now predict every requested frame, "Skip user labeled frames" now actually skips user-labeled frames (they were silently re-predicted before), and tracking-only runs work for these targets. Unreadable videos are reported by sleap-nn instead of failing with "Failed to read frame index 0.", and Connect Single Track Breaks is blocked up front with a clear message when neither max tracks nor max instances is set. The legacy sleap-track --frames 1-100 now passes the parsed frame list to sleap-nn instead of the raw string. Auto-generated prediction filenames are shorter: video_1.mp4.<timestamp>.predictions.slp instead of video_1.mp4_project.slp.<timestamp>.predictions.slp. Requires sleap-nn 0.3.4.

Fix package export crash with sleap-io 0.9 (#2858)

Exporting a training job package or a labels package with embedded frames from the GUI crashed with TypeError: on_progress() takes 2 positional arguments but 3 were given. The progress callback now accepts sleap-io's new phase argument.

Fix Evaluation Metrics dialog crash on legacy non-UNet models (#2863)

The Evaluation Metrics window crashed with KeyValidationError if a legacy (SLEAP ≤1.4) model with a non-UNet backbone (pretrained encoder, hourglass, resnet, LEAP) was anywhere in the project folder. Those models now appear with a label such as "pretrained_encoder (legacy)", and a single unreadable model config skips its row with a warning instead of crashing the whole table.

Every track gets a distinguishable color (#2869)

The default palette had only 7 colors, so in projects with 8+ tracks, track 8 was the same color as track 1. The palette now has 28 well-separated colors and generates more (up to 128) when needed. The first 7 colors are unchanged.

Instances tab node count and "Auto" crop size (#2871)

The Instances tab "Points" count no longer includes nodes the user hid, so a 12/15 prediction converted to a user instance reads 12/15, matching the canvas. The training dialog's "Auto" crop size now matches what sleap-nn actually uses (anchor position, mixed-resolution size matching, min_crop_size, user_instances_only) instead of under-reporting it, and the clipping warning is anchor-aware.

Long video names in the Suggestions table (#2886)

With long video filenames, every row of the Labeling Suggestions table read 1: .... The Video column now stays on one line and trims from the left, like the Videos dock, so the distinguishing end of the filename is visible.

Tracker settings boxes looked empty on Windows (#2895)

On Windows, the Max Tracks, Elapsed Frame Window, Robust Quantile and Filter Overlapping threshold boxes in Run Inference → Tracker (and the Size Distribution widget's boxes) appeared empty — the values were set but had no room to draw. The boxes now size to fit their values.

Tracking and inference settings applied as shown in the dialog (#2896)

Five settings silently did something other than what the dialog showed:

  • "Use max (non-robust)" scoring now really uses max — it was using mean, which affected every default tracking run.
  • OKS tracking on single-node skeletons now falls back to centroid matching instead of effectively matching at random (50 ID switches in 60 frames → 0 in testing).
  • Tracking-only in "Keep" and "Clear all" modes no longer duplicates instances.
  • Tracking-only now respects the Suggestions / User labeled / Frames with predictions targets instead of retracking every labeled frame.
  • The Accelerator dropdown is now passed to inference as --device.

Training dialog keeps hidden config settings and really turns augmentation off (#2897)

Setting rotation to "Off" and unchecking Scale did not disable geometric augmentation when the base config had affine_p > 0 (e.g. when reusing a trained model's config) — every sample was still rotated and scaled. Choosing a profile or config also dropped every setting the form doesn't show (optimizer, LR scheduler, min_train_steps_per_epoch, init_weights); these are now kept, which restores init_weights: xavier for the bundled multi-class (ID) profiles. Training results with affected configs may differ from v1.6.5.


Other

Contributing guide fixes (#2866)

The contributing guide now points to Ruff instead of Black and a deleted dev_requirements.txt, and a dead issue-template link and a typo are fixed.


Dependency Updates

sleap-io 0.9.2 → 0.9.3

Performance and video-compatibility release, no breaking changes:

  • AV1 videos are now read with PyAV by default when it's installed — 4–6x faster on Windows, and on Linux it fixes AV1 videos that OpenCV couldn't decode and silently loaded with 0 frames. An explicit plugin= still takes precedence (#561).
  • All PyAV reads now use frame threading, making H.264/HEVC decoding 3–5x faster (#561).
  • Fixed docs examples showing Labels arguments the constructor never accepted (#560).

See the sleap-io v0.9.3 release notes for full details.

sleap-nn 0.3.3 → 0.3.4

Large release (34 PRs) adding appearance-based re-identification and fixing many inference, tracking and training issues:

  • ⚠️ Breaking: PyAV is now a required dependency, and a video that can't be decoded now raises an error instead of producing an empty predictions file (#770).
  • ⚠️ Breaking: .slp + --video_index without --frames now predicts the whole video, not just frames already in the .slp; --exclude_user_labeled means "every frame except user-labeled ones" (#762). This powers the GUI fix in #2893.
  • ⚠️ Breaking: legacy training_config.json rotate/scale flags are now respected — previously every legacy config trained with ±180° rotation and scaling. ZMQ monitoring is now off unless ports are set explicitly (the GUI sets them) (#760).
  • ⚠️ Breaking: apply_tracking / Predictor.retrack now modify and return their input, and multi-video files are tracked per video (#752).
  • ⚠️ Breaking: last.ckpt is rewritten every epoch for all model types when save_last: true (#751).
  • New embedding model type that turns an animal crop into an appearance vector for re-identification, with ONNX export (#671); embeddings and identities can be saved to .slp and used for appearance-based tracking (--features embeddings, --appearance_weight) (#745).
  • New sleap-nn eval-tracking command that scores identity consistency (ID switches, IDF1, MT/PT/ML, fragmentation) (#741).
  • Opt-in focal loss for centroid heads in crowded scenes (#733); sleap-io centroid methods on centroid/top-down/segmentation heads (#738); num_workers: "auto" for data loaders (#760).
  • Fixed --tracking_pre_cull_to_target keeping the lowest-scoring instances instead of the highest, and culling user labels (#749).
  • Fixed tracking deleting masks, ROIs, centroids, suggestions and provenance, and mixing tracks across videos; appearance-only tracking is ~10x faster (#752).
  • Fixed the "Auto" instance crop size coming out too small and silently dropping labeled nodes from training; a warning now fires when a crop clips instances (#748).
  • Fixed .slp runs with --video_index/--frames stopping at already-labeled frames (#732).
  • Fixed OKS evaluation counting ground-truth instances with a zero-area keypoint bounding box as false negatives (#734).
  • Training robustness fixes: ZMQ callback teardown deadlock (#761), image-cache memory estimate on macOS/Windows (#768), Windows UnicodeEncodeError with redirected output (#769), disk-cache location and legacy brightness_min configs (#735), compute_oks with multiple predictions (#739), and pretrained-backbone encoder/offline/BatchNorm-freeze issues (#740).

See the sleap-nn v0.3.4 release notes for full details.


Full Changelog: v1.6.5...v1.6.6