SLEAP v1.1.0a9
Pre-release
Pre-release
Pre-release of SLEAP v1.1.0 update.
In this update, we have updated TensorFlow to 2.3, overhauled the inference module for performance and much more. See the highlights and full list of changes below.
Highlights
- 2-8x performance improvements in inference
- 32 new pretrained neural network backbones
- Learnable offset regression for subpixel localization
- High-level API for labels and model loading:
sleap.load_file()
andsleap.load_model()
- Linux conda package and smaller package size for updates
Changelog
- Update to TensorFlow 2.3.1.
- Implement top-down, bottom-up and single-instance model inference as self-contained
tf.keras.Model
s (sleap.nn.inference.InferenceModel
base class). - Re-implement peak finding and refinement with batch-level functions for improved performance.
- Re-implement PAF grouping methods for batch-level inference and drastically improved test coverage.
- Add pipeline utility methods
peek()
anddescribe()
to query the output asleap.data.Pipeline
. - Color by track when plotting with
LabeledFrame.plot()
method and tracks are available. - Add slice indexing to
sleap.Labels
. - Better string representations for core data structures
Labels
,LabeledFrame
and `Skeleton. - Fix
sleap.nn.evals.evaluate_model()
saving even withsave=False
specified. - Add
RandomCropper
transformer for augmentation. sleap.nn.data.pipelines
andsleap.nn.inference
submodules now available as top-level imports (sleap.pipelines
andsleap.inference
).sleap.nn.viz.plot_instance()
now accepts raw point arrays.- Switch to
tf.data.Dataset.cache()
for preloading transformer. - Add
LambdaMap
for user-function transformer creation. - Add high level model loading interface (
sleap.load_model()
) - Switch to using external conda packages for TensorFlow and PySide2.
- Switch to GitHub Actions for CI and builds.
- Add pretrained encoder UNet-style model backbones based on qubvel/segmentation_models (#435)
- Breaking
sleap.nn.inference
changes (#445)- API change:
TopDownModel
->TopDownInferenceModel
- API change:
Predictor.predict()
no longer hasmake_instances
kwarg
- API change:
- Added some GPU-related aliases to top-level imports (#446)
sleap.use_cpu_only()
: Disable GPU use.sleap.disable_preallocation()
: Disable preallocation of entire GPU memory which causes crashes on some systems.sleap.system_summary()
: Print a summary of GPUs detected on the system and their state.
- Import folders of (ma)DLC labeled data with multiple videos (#437)
- Implement trainable offset regression (#447)
- Fix GUI freezing in Mac OS Big Sur (#450)
- Fix single instance inference and RGB video detection (#459)
Installing
We strongly recommend using Miniconda to install and manage your Python environments. This will also make GPU support work transparently without installing additional dependencies.
Using Conda (Windows/Linux)
- Delete any existing environment and start fresh (recommended):
conda env remove -n sleap_alpha
- Create new environment
sleap_alpha
(recommended):
conda create -n sleap_alpha -c sleap/label/dev sleap=1.1.0a9
Or to update inside an existing environment:
conda install -c sleap/label/dev sleap=1.1.0a9
Using PyPI (Windows/Linux/Mac)
- Create a new conda environment (recommended):
conda create -n sleap_alpha python=3.6
conda activate sleap_alpha
- Install from PyPI:
pip install sleap==1.1.0a9
Or to upgrade an existing installation:
pip install --upgrade --force-reinstall sleap==1.1.0a9
From source (development)
- Clone the repository at this tag:
git clone https://github.com/murthylab/sleap --branch v1.1.0a9 sleap_v1.1.0a9
cd sleap_v1.1.0a9
- Install conda environment and activate:
conda install -f environment.yml -n sleap_v1.1.0a9
conda activate sleap_v1.1.0a9
- Changes made in the code will be immediately reflected when running SLEAP in this environment.