Skip to content

SLEAP v1.2.0a3

Pre-release
Pre-release
Compare
Choose a tag to compare
@talmo talmo released this 13 Feb 19:22
· 360 commits to develop since this release
6c50079

Pre-release of SLEAP v1.2.0.

This includes updates to core libraries used in SLEAP, including TensorFlow to enable support for newer NVIDIA GPUs.

Warning: This is a pre-release! Expect bugs and strange behavior when testing.

Quick install

conda (Windows/Linux/GPU):

conda create -y -n sleap -c sleap -c sleap/label/dev -c nvidia -c conda-forge sleap=1.2.0a3

pip (any OS):

pip install sleap==1.2.0a3

Full changelog

  • Update Python, TensorFlow and others (#609): enables GPU support for Ampere and newer cards, e.g., 3080, A100, etc.

    • Fixes #454
    • Version changes:
      • python=3.6python=3.7
      • tensorflow=2.3.1tensorflow=2.7.0 (2.6.2 should also work)
      • cudatoolkit=10.1cudatoolkit=11.3.1
      • cudnn=7.6cudnn=8.2.1
      • h5py=2.10.0h5py=3.1.0 (up to 3.6.0 should also work)
      • numpy=1.18.1numpy=1.19.5 (up to 1.21.2 should also work)
      • imgaug=0.3.0imgaug=0.4.0
      • attrs=19.3attrs=21.2.0
      • cattrs=1.0.0rccattrs=1.1.1
      • rich=9.10.0rich=10.16.1
      • scipy=1.4.1scipy=1.7.1 (1.4.1 should also work)
  • Conda packages and environments now require nvidia::cuda-nvcc=11.3 to enable platform specific optimizations (#623).

    • Note: This now requires the -c nvidia channel addition to conda commands.
  • Clean up CI/CD pipelines (#618):

    • Now building on release or when build version is bumped
    • environment.yml is not using sleap:: channel packages and instead relies on pip for flexibility
    • environment_no_cuda.yml is not using sleap:: packages and is now the default for CI
    • environment_build.yml DOES use sleap:: packages so we don't have to include tensorflow and pyside2 in the conda package for sleap
  • GUI enhancements (#618)

    • Ensure randomly initialized points don't go beyond frame bounds (#613)
    • Add batch set button in video importer (#613)
    • Added command to return to last interacted frame (defaults to Ctrl + A) (#613)
  • Labeling GUI node visibility fixes (#619)

    • Add option for toggling display of non-visible user nodes to View menu.
    • Deal with empty instances correctly. They are now not plotted at all, rather than plotted and then hidden.
      • Fixes "ValueError: min() arg is an empty sequence" error
      • Fixes "RuntimeWarning: All-NaN axis encountered" error
  • Additional numpy conversion and label manipulation functionality (#621)

    • Add LabeledFrame convenience properties:
      • user_instances, n_user_instances, has_user_instances
      • predicted_instances, n_predicted_instances, has_predicted_instances
      • tracked_instances, n_tracked_instances, has_tracked_instances
    • Fix LabeledFrame.numpy() when there are no instances in the frame
    • Labels.numpy() revamp
      • Works with untracked and single instance data
      • Allow for specifying video as integer
  • Training profile tweaks (#622)

    • Standardize profiles and delete old ones
      • Sigma defaults to 2.5 for all profiles
      • Learning rate scheduler and early stopping now use threshold of 1e-8
      • Rotation augmentation defaults to [-15, 15] so front facing videos work by default
    • Change default inference target behavior (selected clip → current frame → none)
    • Hardcode order for built-in profiles (Defaults are now the smaller models)
    • Auto-detect single vs multi-instance model type for default tab from data
  • Fix centroid model evaluation when GT instances have NaNs (#618)

  • Fix PAF instance assembly when skeleton is not topologically sorted (#618)

    • Thanks E. Mae Guthman for the report!
  • Fix single instance model visualization during training (#620) (Fixes #604)

  • Drag and drop support for videos and projects (#632)

  • Fix failing grayscale conversion at inference time on GPU (#639) (Fixes #638)

  • Training job generation tweaks (#642)

    • Training job package exports a jobs.yaml that describes the training/inference tasks.
    • Training CLI no longer specifies all video paths when building command. Fixes issue where paths are too long or there are too many videos.
  • Fix path resolution in training & inference (#643) (Fixes #634)

  • Fix regression in #639 breaking multi-size inference (#645)

  • Fix data loading regression in #634 (#646)

  • Bump minor versions and relax some constraints (#647)

  • Use rich to print inference CLI inputs and provenance (#651)

  • Make PAF distance penalty more usable (#650)

    • Adds CLI args:
  --max_edge_length_ratio MAX_EDGE_LENGTH_RATIO
                        The maximum expected length of a connected pair of
                        points as a fraction of the image size. Candidate
                        connections longer than this length will be penalized
                        during matching. Only applies to bottom-up (PAF)
                        models.
  --dist_penalty_weight DIST_PENALTY_WEIGHT
                        A coefficient to scale weight of the distance penalty.
                        Set to values greater than 1.0 to enforce the distance
                        penalty more strictly. Only applies to bottom-up (PAF)
                        models.

Installing

We recommend using Miniconda to install and manage your Python environments. This will also make GPU support work transparently without installing additional dependencies.

See the Installation page in the docs for more info.

Using Conda (Windows/Linux)

  1. Delete any existing environment and start fresh (recommended):
conda env remove -n sleap
  1. Create new environment called sleap (recommended):
conda create -y -n sleap -c sleap -c sleap/label/dev -c nvidia -c conda-forge sleap=1.2.0a3

Using PyPI (Windows/Linux/Mac)

  1. Create a new conda environment called sleap (recommended):
conda create -n sleap python=3.7
conda activate sleap
  1. Install from PyPI:
pip install sleap==1.2.0a3