Releases: talmolab/sleap
SLEAP v1.4.1a2
SLEAP v1.4.1a2 is a pre-release. See 1.3.3 for the latest stable release. The crucial change here is Fix zmq inference by @roomrys in #1800 since inference was not working in the pre-release v1.4.1a1 due to the addition of zmq port options for training in #1780 that were not being used for inference.
Quick install
mamba
(Windows/Linux/GPU):
mamba create -y -n sleap_v1.4.1a2 -c conda-forge -c nvidia -c sleap/label/dev -c anaconda sleap=1.4.1a2
mamba
(Mac):
mamba create -y -n sleap_v1.4.1a2 -c conda-forge -c anaconda -c sleap/label/dev sleap=1.4.1a2
pip
(any OS except Apple Silicon):
pip install sleap[pypi]==1.4.1a2
What's Changed
Fixes
Workflow Changes
- Fix windows conda package upload and build ci by @eberrigan in #1792
- Bump to v1.4.1a2 by @eberrigan in #1835
Enhancements and Refactors
- Set selected instance to None after removal by @roomrys in #1808
- Add
InstancesList
class to handle backref toLabeledFrame
by @roomrys in #1807
Full Changelog: v1.4.1a1...v1.4.1a2
SLEAP v1.4.1a1
SLEAP v1.4.1a1 is a pre-release. See 1.3.3 for the latest stable release. There are many changes to dependencies in this pre-release: if you are having installation issues with v1.3.3, you should try this version instead.
Quick install
mamba
(Windows/Linux/GPU):
mamba create -y -n sleap_v1.4.1a1 -c conda-forge -c nvidia -c sleap/label/dev -c anaconda sleap=1.4.1a1
mamba
(Mac):
mamba create -y -n sleap_v1.4.1a1 -c conda-forge -c anaconda -c sleap/label/dev sleap=1.4.1a1
pip
(any OS except Apple Silicon):
pip install sleap[pypi]==1.4.1a1
What's Changed
Enhancements
- Add options to set background color when exporting video by @scott-yj-yang in #1328
- Increase range on batch size by @roomrys in #1513
- Add resize/scroll to training GUI by @KevinZ0217 in #1565
- support loading slp files with non-compound types and str in metadata by @lambdaloop in #1566
- change inference pipeline option to tracking-only by @shrivaths16 in #1666
- Only propagate Transpose Tracks when propagate is checked by @vaibhavtrip29 in #1748
- Add batch size to GUI for inference by @shrivaths16 in #1771
- Add ZMQ support via GUI and CLI by @shrivaths16 in #1780
- Change menu name to match deleting predictions beyond max instance by @shrivaths16 in #1790
- Adding ragged metadata to
info.json
by @shrivaths16 in #1765 - Add option to export to CSV via sleap-convert and API by @eberrigan in #1730
Refactors
- Set default callable for
match_lists_function
by @roomrys in #1520 - Allow passing in
Labels
toapp.main
by @roomrys in #1524 - Replace (broken)
--unrag
with--ragged
by @roomrys in #1539 - Add function to create app by @roomrys in #1546
- Refactor
AddInstance
command by @roomrys in #1561
Fixes
- Graceful failing with seeking errors by @talmo in #1712
- Fix IndexError for hdf5 file import for single instance analysis files by @shrivaths16 in #1695
- Import DLC with uniquebodyparts, add Tracks by @getzze in #1562
- Make the hdf5 videos store as int8 format by @lambdaloop in #1559
- Scale new instances to new frame size by @ssrinath22 in #1568
- Fix package export by @talmo in #1619
- View Hyperparameter nonetype fix by @shrivaths16 in #1766
Dependency Changes
- Replace imgaug with albumentations by @talmo in #1623
- Fix out of bounds albumentations issues and update dependencies by @eberrigan in #1724
- Update to new TensorFlow conda package by @eberrigan in #1726
- Fix conda builds by @eberrigan in #1776
Workflow Changes
- Fix CI on macosx-arm64 by @talmo in #1734
- Upgrade build actions for release by @eberrigan in #1779
- Fix website build and remove build cache across workflows by @eberrigan in #1786
- Bump to 1.4.1a1 by @eberrigan in #1791
Website Changes
New Contributors
- @scott-yj-yang made their first contribution in #1328
- @lambdaloop made their first contribution in #1559
- @ssrinath22 made their first contribution in #1568
Full Changelog: v1.3.3...v1.4.1a1
SLEAP v1.4.1a0
What's Changed
- Add options to set background color when exporting video by @scott-yj-yang in #1328
- Increase range on batch size by @roomrys in #1513
- Set default callable for
match_lists_function
by @roomrys in #1520 - Allow passing in
Labels
toapp.main
by @roomrys in #1524 - Replace (broken)
--unrag
with--ragged
by @roomrys in #1539 - Add function to create app by @roomrys in #1546
- Refactor
AddInstance
command by @roomrys in #1561 - Import DLC with uniquebodyparts, add Tracks by @getzze in #1562
- Make the hdf5 videos store as int8 format by @lambdaloop in #1559
- Scale new instances to new frame size by @ssrinath22 in #1568
- Fix package export by @talmo in #1619
- Add resize/scroll to training GUI by @KevinZ0217 in #1565
- support loading slp files with non-compound types and str in metadata by @lambdaloop in #1566
- change inference pipeline option to tracking-only by @shrivaths16 in #1666
- Add ABL:AOC 2023 Workshop link by @roomrys in #1673
- Graceful failing with seeking errors by @talmo in #1712
- Fix IndexError for hdf5 file import for single instance analysis files by @shrivaths16 in #1695
- Replace imgaug with albumentations by @talmo in #1623
- Fix out of bounds albumentations issues and update dependencies by @eberrigan in #1724
- Update to new TensorFlow conda package by @eberrigan in #1726
- Fix CI on macosx-arm64 by @talmo in #1734
- Add option to export to CSV via sleap-convert and API by @eberrigan in #1730
- Only propagate Transpose Tracks when propagate is checked by @vaibhavtrip29 in #1748
- View Hyperparameter nonetype fix by @shrivaths16 in #1766
- Adding ragged metadata to
info.json
by @shrivaths16 in #1765 - Add batch size to GUI for inference by @shrivaths16 in #1771
- Fix conda builds by @eberrigan in #1776
- Upgrade build actions for release by @eberrigan in #1779
New Contributors
- @scott-yj-yang made their first contribution in #1328
- @lambdaloop made their first contribution in #1559
- @ssrinath22 made their first contribution in #1568
Full Changelog: v1.3.3...v1.4.1a0
SLEAP v1.4.0a0
What's Changed
- Add options to set background color when exporting video by @scott-yj-yang in #1328
- Increase range on batch size by @roomrys in #1513
- Set default callable for
match_lists_function
by @roomrys in #1520 - Allow passing in
Labels
toapp.main
by @roomrys in #1524 - Replace (broken)
--unrag
with--ragged
by @roomrys in #1539 - Add function to create app by @roomrys in #1546
- Refactor
AddInstance
command by @roomrys in #1561 - Import DLC with uniquebodyparts, add Tracks by @getzze in #1562
- Make the hdf5 videos store as int8 format by @lambdaloop in #1559
- Scale new instances to new frame size by @ssrinath22 in #1568
- Fix package export by @talmo in #1619
- Add resize/scroll to training GUI by @KevinZ0217 in #1565
- support loading slp files with non-compound types and str in metadata by @lambdaloop in #1566
- change inference pipeline option to tracking-only by @shrivaths16 in #1666
- Add ABL:AOC 2023 Workshop link by @roomrys in #1673
- Graceful failing with seeking errors by @talmo in #1712
- Fix IndexError for hdf5 file import for single instance analysis files by @shrivaths16 in #1695
- Replace imgaug with albumentations by @talmo in #1623
- Fix out of bounds albumentations issues and update dependencies by @eberrigan in #1724
- Update to new TensorFlow conda package by @eberrigan in #1726
- Fix CI on macosx-arm64 by @talmo in #1734
- Add option to export to CSV via sleap-convert and API by @eberrigan in #1730
- Only propagate Transpose Tracks when propagate is checked by @vaibhavtrip29 in #1748
- View Hyperparameter nonetype fix by @shrivaths16 in #1766
- Adding ragged metadata to
info.json
by @shrivaths16 in #1765 - Add batch size to GUI for inference by @shrivaths16 in #1771
- Fix conda builds by @eberrigan in #1776
New Contributors
- @scott-yj-yang made their first contribution in #1328
- @lambdaloop made their first contribution in #1559
- @ssrinath22 made their first contribution in #1568
Full Changelog: v1.3.3...v1.4.0a0
SLEAP v1.3.3
This is a brown-bag release following insufficient restrictions on allowable tensorflow
versions for the "pypi" extra sleap[pypi]
in 1.3.2. While the conda packages for 1.3.2 were not affected (since tensorflow
is pulled in from anaconda), the PyPI only package installed via pip install sleap[pypi]
had conflicts between the version of tensorflow
and the version of keras
. See 1.3.0, 1.3.1, and 1.3.2 for previous notable changes.
From 1.3.2+, to install SLEAP through pip use pip install sleap[pypi]
to ensure all dependencies are gathered.
As a reminder:
The 1.3.1 dependency update requires Mamba for faster dependency resolution. If you already have anaconda installed, then you can set the solver to libmamba in the base environment:
conda update -n base conda conda install -n base conda-libmamba-solver conda config --set solver libmamba
Any subsequent
mamba
commands in the docs will need to be replaced withconda
if you choose to use your existing Anaconda installation.Otherwise, follow the recommended installation instruction for Mamba.
Quick install
mamba
(Windows/Linux/GPU):
mamba create -y -n sleap -c conda-forge -c nvidia -c sleap -c anaconda sleap=1.3.3
mamba
(Mac):
mamba create -y -n sleap -c conda-forge -c anaconda -c sleap sleap=1.3.3
pip
(any OS except Apple Silicon):
pip install sleap[pypi]==1.3.3
Full Changelog
Fixes
- Do not try to remove item if already deleted by @roomrys in #1498
- Set
LD_LIBRARY_PATH
on mamba activate by @roomrys in #1496 - Reset
LD_LIBRARY_PATH
on deactivate by @roomrys in #1502
Dependencies
- Add version restirctions to tendorflow for pypi by @roomrys in #1485
- Remove
imageio
pin by @roomrys in #1501
Full Changelog: v1.3.2...v1.3.3
SLEAP v1.3.2
SLEAP 1.3.2 adds some nice usability features thanks to both the community ideas and new contributors! See 1.3.0 and 1.3.1 for previous notable changes.
From 1.3.2+, to install SLEAP through PyPI use pip install sleap[pypi]
to ensure all dependencies are gathered.
As a reminder:
The 1.3.1 dependency update requires Mamba for faster dependency resolution. If you already have anaconda installed, then you can set the solver to libmamba in the base environment:
conda update -n base conda conda install -n base conda-libmamba-solver conda config --set solver libmamba
Any subsequent
mamba
commands in the docs will need to be replaced withconda
if you choose to use your existing Anaconda installation.Otherwise, follow the recommended installation instruction for Mamba.
Quick install
mamba
(Windows/Linux/GPU):
mamba create -y -n sleap -c conda-forge -c nvidia -c sleap -c anaconda sleap=1.3.2
mamba
(Mac):
mamba create -y -n sleap -c conda-forge -c anaconda -c sleap sleap=1.3.2
pip
(any OS except Apple Silicon):
pip install sleap[pypi]==1.3.2
Highlights
- Limit max tracks via track-local queues by @shrivaths16 and @talmo in #1447
- Add option to remove videos in batch by @gitttt-1234 in #1382 and #1406
- Add shortcut to export analysis for current video by @KevinZ0217 in #1414 and #1444
- Add video path and frame indices to metrics by @roomrys in #1396
- Add a button for copying model config to clipboard by @KevinZ0217 in #1433
- Add Option to Export CSV by @gitttt-1234 in #1438
Full Changelog
Enhancements
- Add option to remove videos in batch by @gitttt-1234 in #1382 and #1406
- Add
Track
when addInstance
by @roomrys in #1408 - Add
Video
to cache when addingTrack
by @roomrys in #1407 - Add shortcut to export analysis for current video by @KevinZ0217 in #1414 and #1444
- Add video path and frame indices to metrics by @roomrys in #1396
- Improve error message for detecting video backend by @roomrys in #1441
- Add a button for copying model config to clipboard by @KevinZ0217 in #1433
- Add Option to Export CSV by @gitttt-1234 in #1438
- Limit max tracks via track-local queues by @shrivaths16 and @talmo in #1447
Fixes
- Minor fix in computation of OKS by @shrivaths16 in #1383 and #1399
- Fix
Filedialog
to work across (mac)OS by @roomrys in #1393 - Fix panning bounding box by @gitttt-1234 in #1398
- Fix skeleton templates by @roomrys in #1404
- Fix labels export for json by @roomrys in #1410
- Correct GUI state emulation by @roomrys in #1422
- Update status message on status bar by @shrivaths16 in #1411
- Fix error thrown when last video is deleted by @shrivaths16 in #1421
- Add model folder to the unzip path by @roomrys in #1445
- Fix drag and drop by @talmo in #1449
Dependencies
New Contributors
- @shrivaths16 made their first contribution in #1383
- @gitttt-1234 made their first contribution in #1382
- @KevinZ0217 made their first contribution in #1414
Full Changelog: v1.3.1...v1.3.2
SLEAP v1.3.1
After the massive 1.3.0 release, SLEAP 1.3.1 underwent a much needed dependency and build update. SLEAP 1.3.1 has conda packages for Mac OS X and Apple Silicon 🎉. In terms of features, 1.3.1 has just a few small upgrades/fixes. Be sure to check back in for bigger features still in the works! 🚧 🔨 👀
The 1.3.1 dependency update requires Mamba for faster dependency resolution. If you already have anaconda installed, then you can install Mamba in the base environment:
conda install mamba -n base -c conda-forge
Otherwise, follow the recommended installation instruction for Mamba.
Quick install
mamba
(Windows/Linux/GPU):
mamba create -y -n sleap -c conda-forge -c nvidia -c sleap -c anaconda sleap=1.3.1
mamba
(Mac):
mamba create -y -n sleap -c conda-forge -c anaconda -c sleap sleap=1.3.1
pip
(any OS except Apple Silicon):
pip install sleap==1.3.1
Highlights
- Update environment creation by @roomrys in #1366
- Add
--max_instances
tosleap-track
and GUI by @roomrys in #1305 - Increase GUI crop size range from 512 to 832 by @roomrys in #1295
- Allow returning PAF graph during low level inference by @calebweinreb in #1329
- Fix GUI resume training by @roomrys in #1314
- Fixes GPU memory polling using environment variable filtering by @ericleonardis in #1272
Full Changelog
Enhancements
- Centralize video extensions by @talmo in #1244
- Organize docks by @roomrys in #1265
- Increase GUI crop size range from 512 to 832 by @roomrys in #1295
- Add
--max_instances
tosleap-track
and GUI by @roomrys in #1305 - Allow returning PAF graph during low level inference by @calebweinreb in #1329
Fixes
- Disable data caching by default for SingleImageVideos by @talmo in #1243
- Fix single frame GUI increment by @roomrys in #1254
- Fix conversion to numpy array when last frame(s) do not have labels by @talmo in #1307
- Ensure frames to predict list is unique by @roomrys in #1293
- Fix GUI resume training by @roomrys in #1314
- Do not choose
top_k
instances ifmax_instances
< num centroids by @roomrys in #1313 - Remove
--labels
and redundantdata_path
by @roomrys in #1326 - Create copy of config info to modify (gui) by @roomrys in #1325
- Fixes GPU memory polling using environment variable filtering by @ericleonardis in #1272
- Set
split_by_inds
,test_labels
, andvalidation_labels
to default (GUI) by @roomrys in #1331 - Fix (remove)
SingleImageVideo
caching by @roomrys in #1330
Dependencies
New Contributors
- @ericleonardis made their first contribution in #1272
- @calebweinreb made their first contribution in #1329
Full Changelog: v1.3.0...v1.3.1
SLEAP v1.3.0
For 1.3.0 we want to give our users some cool new features worth upgrading for! This release includes a many enhancements we hope our users will enjoy as well as its fair share of bug fixes.
Quick install
conda
(Windows/Linux/GPU):
conda create -y -n sleap -c sleap -c nvidia -c conda-forge sleap=1.3.0
pip
(any OS except Apple Silicon):
pip install sleap==1.3.0
What's Changed
Highlights
- Added scaling functionality for both the instances and bounding box. by @sean-afshar in #1133
- Add Skeleton Templates by @aaprasad in #1122
- Resumable Training by @jimzers in #1130
- Tracking: robust assignment of the best score to an instance by @getzze in #1062
- Set max instances for top down models by @sheridana in #1070
- Flexibly resize input layer of
tf.keras.Model
upon loading trained model by @roomrys in #1084 - GUI Training: Use hidden params from loaded config by @roomrys in #1053
- Nix export of tracking results by @jgrewe in #1068
- Expose MoveNet to the Inference GUI by @sheridana in #1190
- Add option to "Add Videos..." from single image files by @eberrigan in #1183
- Add GUI and API option to remove unused tracks by @roomrys in #1210
- Add instance and track copy/pasting by @talmo in #1206
- Expose supervised ID models to GUI by @sheridana in #1213
- Ensure data format compatibility by @roomrys in #1222
Full Changelog
Documentation
- Change 'M1' to 'Apple Silicon' by @roomrys in #1188
- Update the Documentation badge by @roomrys in #1211
Enhancements
- GUI Training: Use hidden params from loaded config by @roomrys in #1053
- Add optional unragging arg to model export by @sheridana in #1054
- Tracking: robust assignment of the best score to an instance by @getzze in #1062
- Set max instances for top down models by @sheridana in #1070
- Flexibly resize input layer of
tf.keras.Model
upon loading trained model by @roomrys in #1084 - Add Option to Make Trail Shade Darker/Lighter by @roomrys in #1103
- Nix export of tracking results by @jgrewe in #1068
- Added scaling functionality for both the instances and bounding box. by @sean-afshar in #1133
- Add better error message for top down by @roomrys in #1121
- Add central padding to SizeMatcher by @jiayinghsu in #1129
- Added MoveNet as an external model reference by @jiayinghsu in #1141
- Resumable Training by @jimzers in #1130
- GenericTableModel/View improvements by @jgrewe in #1163
- Add Skeleton Templates by @aaprasad in #1122
- Add better error message for top down by @roomrys in #1121
- Add option of 2 for marker size by @roomrys in #1205
- Support new DLC multi-animal configs by @roomrys in #1204
- Expose MoveNet to the Inference GUI by @sheridana in #1190
- Add option to "Add Videos..." from single image files by @eberrigan in #1183
- Add GUI and API option to remove unused tracks by @roomrys in #1210
- Add instance and track copy/pasting by @talmo in #1206
- Expose supervised ID models to GUI by @sheridana in #1213
- Toggle grayscale of all videos using "Toggle Grayscale" button by @roomrys in #1215
Fixes
- Fix config option to
split_by_inds
by @roomrys in #1060 - Don't create instances during inference if no points were found by @talmo in #1073
- Add one-line fix to VideoWriterSkyvideo by @roomrys in #1082
- Fix parser for sleap-export by @roomrys in #1085
- Refactor commands to load project as
AppCommand
s by @roomrys in #1098 - Create signal that updates plot instead of removing and replotting items by @roomrys in #1134
- Fix symmetric skeletons (via table input) by @roomrys in #1136
- Fix body vs symmetry subgraph filtering by @talmo in #1142
- Handle changing backbones in training editor GUI by @talmo in #1140
- Hotfix for video save #1098 by @roomrys in #1148
- Update no-cuda-env to fix pillow errors by @roomrys in #1201
- Fix environment.yml by @talmo in #1202
- Fix typo in
Skeleton.__repr__
by @roomrys in #1200 - Split trainer cli function into two functions by @roomrys in #1197
- Threaded inference by @talmo in #1203
- Emit the signals to reset table views when data is empty by @talmo in #1207
- Ensure data format compatibility by @roomrys in #1222
New Contributors
- @jgrewe made their first contribution in #1068
- @sean-afshar made their first contribution in #1133
- @eberrigan made their first contribution in #1183
Full Changelog: v1.2.9...v1.3.0
SLEAP v1.3.0a0
Pre-release of SLEAP v1.3.0.
For 1.3.0 we want to give our users some cool new features worth upgrading for! This pre-release includes lots of enhancements and it's fair share of bug fixes.
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.3.0a0
pip
(any OS except Apple Silicon):
pip install sleap==1.3.0a0
Highlights
- Added scaling functionality for both the instances and bounding box. by @sean-afshar in #1133
- Add Skeleton Templates by @aaprasad in #1122
- Resumable Training by @jimzers in #1130
- Tracking: robust assignment of the best score to an instance by @getzze in #1062
- Set max instances for top down models by @sheridana in #1070
- Flexibly resize input layer of
tf.keras.Model
upon loading trained model by @roomrys in #1084 - GUI Training: Use hidden params from loaded config by @roomrys in #1053
- Nix export of tracking results by @jgrewe in #1068
Full changelog
Documentation
Enhancements
- GUI Training: Use hidden params from loaded config by @roomrys in #1053
- Add optional unragging arg to model export by @sheridana in #1054
- Tracking: robust assignment of the best score to an instance by @getzze in #1062
- Set max instances for top down models by @sheridana in #1070
- Flexibly resize input layer of
tf.keras.Model
upon loading trained model by @roomrys in #1084 - Add Option to Make Trail Shade Darker/Lighter by @roomrys in #1103
- Nix export of tracking results by @jgrewe in #1068
- Added scaling functionality for both the instances and bounding box. by @sean-afshar in #1133
- Add better error message for top down by @roomrys in #1121
- Add central padding to SizeMatcher by @jiayinghsu in #1129
- Added MoveNet as an external model reference by @jiayinghsu in #1141
- Resumable Training by @jimzers in #1130
- GenericTableModel/View improvements by @jgrewe in #1163
- Add Skeleton Templates by @aaprasad in #1122
- Add better error message for top down by @roomrys in #1121
Fixes
- Fix config option to
split_by_inds
by @roomrys in #1060 - Don't create instances during inference if no points were found by @talmo in #1073
- Add one-line fix to VideoWriterSkyvideo by @roomrys in #1082
- Fix parser for sleap-export by @roomrys in #1085
- Refactor commands to load project as
AppCommand
s by @roomrys in #1098 - Create signal that updates plot instead of removing and replotting items by @roomrys in #1134
- Fix symmetric skeletons (via table input) by @roomrys in #1136
- Fix body vs symmetry subgraph filtering by @talmo in #1142
- Handle changing backbones in training editor GUI by @talmo in #1140
- Hotfix for video save #1098 by @roomrys in #1148
New Contributors
- @jgrewe made their first contribution in #1068
- @sean-afshar made their first contribution in #1133
SLEAP v1.2.9
Stable release of SLEAP v1.2.9. This release has lots of bug fixes, a few GUI enhancements, and one CLI fix.
See the release notes for v1.2.0, v1.2.1, v1.2.2, v1.2.7 for previous major changes.
Quick install
conda
(Windows/Linux/GPU):
conda create -y -n sleap -c sleap -c nvidia -c conda-forge sleap=1.2.9
pip
(any OS):
pip install sleap==1.2.9
See the Installation page in the docs for more info.
Highlights
- Prefer user instances when calling Labels.numpy() (#996)
- Add upper limit of the instance count in prediction score labeling suggestion method (#981)
- Add more options to render video: wedges, palette, and distinctly color (#998)
- Always draw user instances even if all nodes marked as not visible (#1002)
- Add frame chunk method in labeling suggestions (#1007)
Full changelog
Documentation
Enhancements
- Prefer user instances when calling Labels.numpy() (#996)
- Add more options to render video: wedges, palette, and distinctly color (#998)
- Add upper limit of the instance count in prediction score labeling suggestion method (#981)
- Speed-up cache for multi-video projects (#1017)
- Increase max number for target instances in simple tracker form (#1037)
- Share usage data #1038
- Add frame chunk method in labeling suggestions (#1007)
Fixes
- Fix printing of auto-selected GPU free memory (#955)
- Fix add suggestions when target is current video (#956)
- Fix
sleap-export
cli arg parsing (#962) - Fix cattr in Python 3.9 (#967)
- Fix editing track name clears the old entry on double-click (#980)
- Prune saved shifted instances (#1001)
- Update suggestions upon video removal (#1009)
- Correctly add .h5 extension to analysis files on Linux (#1010)
- GUI Table: Do not set item value if same as current value (#1022)
- Always draw user instances even if all nodes marked as not visible (#1002)
- Shifted instances: make sure ref_instances is not empty (#1029)
- Trails prefer user instances over predicted (#1036)