Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed-up labeling suggestions look-up #709

Merged
merged 12 commits into from
Apr 25, 2022

Conversation

roomrys
Copy link
Collaborator

@roomrys roomrys commented Apr 18, 2022

Description

Use the data cache to look-up labeling suggestions.

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (Speed-Up)

Does this address any currently open issues?

Many suggested frames slow down GUI #695

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

* Use Labels.get() kwargs to access Labels.find() through Labels.find_first()
@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #709 (4651652) into develop (13ba3f6) will increase coverage by 0.19%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #709      +/-   ##
===========================================
+ Coverage    65.62%   65.82%   +0.19%     
===========================================
  Files          126      126              
  Lines        21088    21094       +6     
===========================================
+ Hits         13840    13886      +46     
+ Misses        7248     7208      -40     
Impacted Files Coverage Δ
sleap/gui/app.py 76.52% <100.00%> (+0.98%) ⬆️
sleap/gui/dataviews.py 79.66% <100.00%> (+5.33%) ⬆️
sleap/io/dataset.py 82.76% <100.00%> (+1.86%) ⬆️
sleap/gui/suggestions.py 52.94% <0.00%> (+0.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13ba3f6...4651652. Read the comment docs.

@roomrys roomrys marked this pull request as ready for review April 19, 2022 00:15
@roomrys roomrys requested a review from talmo April 19, 2022 00:15
sleap/gui/app.py Show resolved Hide resolved
sleap/gui/dataviews.py Show resolved Hide resolved
sleap/io/dataset.py Show resolved Hide resolved
@@ -689,14 +691,14 @@ def __getitem__(self, key, *args) -> Union[LabeledFrame, List[LabeledFrame]]:
else:
raise KeyError("Invalid label indexing arguments.")

def get(self, *args) -> Union[LabeledFrame, List[LabeledFrame]]:
def get(self, *args, **kwargs) -> Union[LabeledFrame, List[LabeledFrame]]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above re: __getitem__.

Moving most of the contents of __getitem__ to this get() method would also be a good opportunity to properly typehint here since *args, **kwargs make it really difficult to know how to call methods and should be avoided where possible.

@roomrys roomrys requested a review from talmo April 22, 2022 21:54
sleap/io/dataset.py Outdated Show resolved Hide resolved
sleap/io/dataset.py Show resolved Hide resolved
sleap/io/dataset.py Show resolved Hide resolved
@roomrys roomrys requested a review from talmo April 22, 2022 23:51
@roomrys roomrys marked this pull request as draft April 23, 2022 00:10
@roomrys roomrys marked this pull request as ready for review April 25, 2022 17:09
@roomrys roomrys merged commit 6da8f0d into develop Apr 25, 2022
@roomrys roomrys deleted the liezl/labeling_suggestions_speedup branch April 25, 2022 18:48
talmo added a commit that referenced this pull request May 10, 2022
* Add support for new maDLC labels format (#678)

* Supervised Identity Prediction (#460) (#679)

* squash merge from roomrys/sleap-1 (#460)

* Add test dataset with tracks

* Add track indices to labels provider

* Add identity class map generator

* Update docstring

* Add class map model trainer, head and config

* Add inference

* Docs and tests for identity module
- Slightly modified matching to greedy-like behavior
* Fix inference
- Add imports to evals inference
- Move the common Predictor.predict() method to base class
- Fix docstrings for new inference classes
- Add test model and integration test

* Generate tracks from config metadata if not provided

* Force typecasting in identity functions

* Force boolean masking op

* Clean up inference module
- Move common Predictor methods to base class
- Switch to `model.predict_on_batch()` for massive performance increase
  with `predictor.predict()`.
- Enable prediction directly on arrays (slow)

* Enable Qt5Agg backend only when necessary during training

* Top-down supervised identity prediction (#476)

* Add sizematcher to new training pipelines

* Fix topdown ID visualization during training

* Add LabeledFrame.tracked_instances property for filtering
- Greedy checking in has_* properties

* Add Labels.copy() method for creating deep copies
- Works by serializing and deserializing to JSON (inefficient, but
  guaranteed to work since we have lots of coverage on I/O)

* Extract labels with tracked instances
- Add copy kwarg to extract to return deep copies
- Remove user and/or untracked instances in with_user_labels_only().
  Previously this functionality was blocked since we couldn't remove the
  instances from labeled frames without affecting the source labels.
- Add remove_untracked_instances() utility for filtering out instances
  from the labels.

* Add track filtering in LabelsReader provider
- This is slightly redundant with
  Labels.with_user_labels_only(..., with_track_only=True) but serves as
  an extra guarantee that we don't train on instances without tracks
  accidentally, regardless of how the data is preprocessed. Can still
  emit "empty" frames if no instances have tracks set, however.

* Add track filtering in DataReaders during training
- Auto-enabled when training from ID models
- Filters out instances without tracks BEFORE train/val splitting
- Split is now done on copy of labels
- Fix DataReaders arg typing
- Tests for DataReaders

* Add crop size detection to topdown ID models
- Add training integration test for topdown ID

* add removal of untracked instances for labeled instances (#460)

* Add removal of untracked instances for labeled instances
- previously used `LabeledFrame.tracked_instances()` which only returns predicted instances with tracking
- created `LabeledFrame.remove_untracked` which returns both user labeled and predicted instances with tracking
* Formatting
- using black v20.8b1

* add tests for Labels and LabeledFrames (#460)

* Add tests
- test `Labels.remove_untracked_instances()` for both cases of `remove_empty_frames: bool`
-test `LabeledFrames.remove_untracked()` for both user-labeled and predicted frames

* formatting (#460)

* add newline (no indent) at end of files which had failed Lint test

* clean-up comments and unneeded parenthesis (#460)

* Last merge fixes

* Lint

* Bump minor version (#684)

* Fix numpy conversion in inference (#687)

* Expose identity module in nn

* Override predict_on_batch to optionally cast data to numpy

* Fix topological sorting to always start with root node (#688)

* Fix topological sorting to always start with root node

* Add test

* Create unique default shortcuts (#686) (#690)

* Training monitor enhancements (#691)

* Training monitor enhancements
- Cleaned up imports
- Docstrings
- Now update based on time, not epochs
- Added markers for epoch-level losses
- Added best validation loss marker and text
- Reduced minimum possible y-axis value when log scaling
- Marker colors, alpha, sizes and line widths adjusted

* Move training monitor to gui submodule

* add metrics to training monitor title

* add mean time per epoch
* add ETA to finish next 10 epochs
* add plateau patience fraction (when in plateau)
* update dev_requirements to install version of click that does not break black

* Add code coverage

* add coverage for all lines within LossViewer.update_runtime()

Co-authored-by: roomrys <38435167+roomrys@users.noreply.github.com>

* add hide instance menu item and hotkey (#692)

* Single press of hotkey (H) toggles instance visibility

* Add instance visibility message/warning to status bar

* Resize keyboard shortcuts dialog box

* Fix formatting to read and save tracking scores (#693)

* Update formatting to include tracking_scores

* Add formatting fixtures, tracking_scores test

* Hide predicted instances with hotkey (#694)

* add hide instance menu item and hotkey

* single press of hotkey (H) toggles instance visibility

* Add instance visibility message to status bar

* Resize keyboard shortcuts dialog box

* Make shortcuts pop-up slightly narrower and taller

* Hide predicted instances as well

* hide predicted instances
* update status bar message:
- count only visible predicted and labeled instances
- only show "hidden instances" warning when number instances in frame is greater than 0
- normal font weight

* Logic update for detecting instances to show

* Add test for instance visibility

* Change which qtbot wait is used

* Change timeout of qtbot.waitActive

- attempt to pass ubuntu tests on github actions

* Use arbitrary qtbot.wait

Hope to verify that ubuntu test fails due to a waiting error

* Add test for instance colors

- predict ubuntu test will fail

* Add test skip mark for ubuntu

* Import pytest

* Skip test for linux

* Remove unused packages

* Talmo/pre v1.2.2 (#696)

* Change default tab appearance

* Bump to 1.2.2

* Add more notebooks to docs (#698)

* Fix missing links and update content

* Add new notebooks

* Add troubleshooting guide

* Datasets and paper link update

* Add support for new single animal DLC format (#704)

* Add support for single animal DLC files (#702)

* Add test for new format single animal DLC

* Add test images for visual verification

* Add data and test for old version single animal DLC file

* Add edges to analysis h5 (#707)

* Add edge names and edge indices to analysis h5

* Add test for node names and edge names in analysis h5 export

* Speed-up labeling suggestions look-up (#709)

* Use data cache to speed-up labeling suggestions

* Move logic from Labels.__getitem__ to Labels.get

* Use Labels.__getitem__ as a wrapper to Labels.get

* Add support for AlphaTracker import (#716)

* Add support for AlphaTrackor import

* Integrate adaptor into sleap

* Add tests

* Specify pip version in environment_no_cuda.yml

* Specify pip version in environment.yml

* Remove pip version from environment_no_cuda.yml

* Specify channel and version for pip in environment_no_cuda

* Add GUI-based test

* Add property tests and lint

* Delete condaenv.25edtblj.requirements.txt

Co-authored-by: Talmo Pereira <talmo@salk.edu>

* Update links from murthylab to talmolab (#724)

* Update links from murthylab to talmolab

* Add conda channel for pip install in no cuda yml

* Add try/except for release checker

* Update rest API link

* SLEAP v1.2.3 (#726)

* Update links from murthylab to talmolab

* Add conda channel for pip install in no cuda yml

* Add try/except for release checker

* Update rest API link

* Update pip in all environments

* Update to v1.2.3

* Fix typo on the datasets

Co-authored-by: sheridana <asheridan@salk.edu>

Co-authored-by: roomrys <38435167+roomrys@users.noreply.github.com>
Co-authored-by: sheridana <asheridan@salk.edu>
talmo added a commit that referenced this pull request Jul 26, 2022
* Add support for new maDLC labels format (#678)

* Supervised Identity Prediction (#460) (#679)

* squash merge from roomrys/sleap-1 (#460)

* Add test dataset with tracks

* Add track indices to labels provider

* Add identity class map generator

* Update docstring

* Add class map model trainer, head and config

* Add inference

* Docs and tests for identity module
- Slightly modified matching to greedy-like behavior
* Fix inference
- Add imports to evals inference
- Move the common Predictor.predict() method to base class
- Fix docstrings for new inference classes
- Add test model and integration test

* Generate tracks from config metadata if not provided

* Force typecasting in identity functions

* Force boolean masking op

* Clean up inference module
- Move common Predictor methods to base class
- Switch to `model.predict_on_batch()` for massive performance increase
  with `predictor.predict()`.
- Enable prediction directly on arrays (slow)

* Enable Qt5Agg backend only when necessary during training

* Top-down supervised identity prediction (#476)

* Add sizematcher to new training pipelines

* Fix topdown ID visualization during training

* Add LabeledFrame.tracked_instances property for filtering
- Greedy checking in has_* properties

* Add Labels.copy() method for creating deep copies
- Works by serializing and deserializing to JSON (inefficient, but
  guaranteed to work since we have lots of coverage on I/O)

* Extract labels with tracked instances
- Add copy kwarg to extract to return deep copies
- Remove user and/or untracked instances in with_user_labels_only().
  Previously this functionality was blocked since we couldn't remove the
  instances from labeled frames without affecting the source labels.
- Add remove_untracked_instances() utility for filtering out instances
  from the labels.

* Add track filtering in LabelsReader provider
- This is slightly redundant with
  Labels.with_user_labels_only(..., with_track_only=True) but serves as
  an extra guarantee that we don't train on instances without tracks
  accidentally, regardless of how the data is preprocessed. Can still
  emit "empty" frames if no instances have tracks set, however.

* Add track filtering in DataReaders during training
- Auto-enabled when training from ID models
- Filters out instances without tracks BEFORE train/val splitting
- Split is now done on copy of labels
- Fix DataReaders arg typing
- Tests for DataReaders

* Add crop size detection to topdown ID models
- Add training integration test for topdown ID

* add removal of untracked instances for labeled instances (#460)

* Add removal of untracked instances for labeled instances
- previously used `LabeledFrame.tracked_instances()` which only returns predicted instances with tracking
- created `LabeledFrame.remove_untracked` which returns both user labeled and predicted instances with tracking
* Formatting
- using black v20.8b1

* add tests for Labels and LabeledFrames (#460)

* Add tests
- test `Labels.remove_untracked_instances()` for both cases of `remove_empty_frames: bool`
-test `LabeledFrames.remove_untracked()` for both user-labeled and predicted frames

* formatting (#460)

* add newline (no indent) at end of files which had failed Lint test

* clean-up comments and unneeded parenthesis (#460)

* Last merge fixes

* Lint

* Bump minor version (#684)

* Fix numpy conversion in inference (#687)

* Expose identity module in nn

* Override predict_on_batch to optionally cast data to numpy

* Fix topological sorting to always start with root node (#688)

* Fix topological sorting to always start with root node

* Add test

* Create unique default shortcuts (#686) (#690)

* Training monitor enhancements (#691)

* Training monitor enhancements
- Cleaned up imports
- Docstrings
- Now update based on time, not epochs
- Added markers for epoch-level losses
- Added best validation loss marker and text
- Reduced minimum possible y-axis value when log scaling
- Marker colors, alpha, sizes and line widths adjusted

* Move training monitor to gui submodule

* add metrics to training monitor title

* add mean time per epoch
* add ETA to finish next 10 epochs
* add plateau patience fraction (when in plateau)
* update dev_requirements to install version of click that does not break black

* Add code coverage

* add coverage for all lines within LossViewer.update_runtime()

Co-authored-by: roomrys <38435167+roomrys@users.noreply.github.com>

* add hide instance menu item and hotkey (#692)

* Single press of hotkey (H) toggles instance visibility

* Add instance visibility message/warning to status bar

* Resize keyboard shortcuts dialog box

* Fix formatting to read and save tracking scores (#693)

* Update formatting to include tracking_scores

* Add formatting fixtures, tracking_scores test

* Hide predicted instances with hotkey (#694)

* add hide instance menu item and hotkey

* single press of hotkey (H) toggles instance visibility

* Add instance visibility message to status bar

* Resize keyboard shortcuts dialog box

* Make shortcuts pop-up slightly narrower and taller

* Hide predicted instances as well

* hide predicted instances
* update status bar message:
- count only visible predicted and labeled instances
- only show "hidden instances" warning when number instances in frame is greater than 0
- normal font weight

* Logic update for detecting instances to show

* Add test for instance visibility

* Change which qtbot wait is used

* Change timeout of qtbot.waitActive

- attempt to pass ubuntu tests on github actions

* Use arbitrary qtbot.wait

Hope to verify that ubuntu test fails due to a waiting error

* Add test for instance colors

- predict ubuntu test will fail

* Add test skip mark for ubuntu

* Import pytest

* Skip test for linux

* Remove unused packages

* Talmo/pre v1.2.2 (#696)

* Change default tab appearance

* Bump to 1.2.2

* Add more notebooks to docs (#698)

* Fix missing links and update content

* Add new notebooks

* Add troubleshooting guide

* Datasets and paper link update

* Add support for new single animal DLC format (#704)

* Add support for single animal DLC files (#702)

* Add test for new format single animal DLC

* Add test images for visual verification

* Add data and test for old version single animal DLC file

* Add edges to analysis h5 (#707)

* Add edge names and edge indices to analysis h5

* Add test for node names and edge names in analysis h5 export

* Speed-up labeling suggestions look-up (#709)

* Use data cache to speed-up labeling suggestions

* Move logic from Labels.__getitem__ to Labels.get

* Use Labels.__getitem__ as a wrapper to Labels.get

* Add support for AlphaTracker import (#716)

* Add support for AlphaTrackor import

* Integrate adaptor into sleap

* Add tests

* Specify pip version in environment_no_cuda.yml

* Specify pip version in environment.yml

* Remove pip version from environment_no_cuda.yml

* Specify channel and version for pip in environment_no_cuda

* Add GUI-based test

* Add property tests and lint

* Delete condaenv.25edtblj.requirements.txt

Co-authored-by: Talmo Pereira <talmo@salk.edu>

* Update links from murthylab to talmolab (#724)

* Update links from murthylab to talmolab

* Add conda channel for pip install in no cuda yml

* Add try/except for release checker

* Update rest API link

* SLEAP v1.2.3 (#726)

* Update links from murthylab to talmolab

* Add conda channel for pip install in no cuda yml

* Add try/except for release checker

* Update rest API link

* Update pip in all environments

* Update to v1.2.3

* Fix typo on the datasets

Co-authored-by: sheridana <asheridan@salk.edu>

* Test CI

* Fix Imports in test_format.py (#732)

Co-authored-by: Talmo Pereira <talmo@salk.edu>

* Add links to discussion (#748)

* Update codecov badge token

* Add option to predict on all videos (#749)

* Contributing Guide, Code of Conduct, and Issues Template (#746)

* Add contributing draft

* Add code of conduct

* Add issues template

* Update bug_report.md

* Create codecov.yml

Split coverage into gui and non-gui counterpart

* Update codecov.yml

* Update codecov.yml

* Create multiple analysis files for multi-video projects (#768)

* Create occupancy matrix (h5) for single video at a time

* Write additional project metadata to the analysis file (for verification purposes)

* Add GUI option to export analysis of all videos

* Change `sleap-convert` to output one analysis file per video in project

* Use default filename for analysis files if multiple videos

Co-authored-by: Talmo Pereira <talmo@princeton.edu>

* Update tracking docs (#761)

* Convert gui and proofreading rst files to md
* Add section in proofreading for culling target instances
* Add propagate track labels docs to gui and proofreading

Co-authored-by: Arlo Sheridan <38435167+sheridana@users.noreply.github.com>

* Generate suggestions for videos with less frames than samples per video (#781)

* Add support for videos that have fewer frames than the Sample Stride length.

* Add support for videos that have less frames than the desired (random) Samples per Video (#783)

Allow suggestions to be generated randomly for all videos regardless of number of frames.

* Add button to toggle grayscale

* Revert "Add button to toggle grayscale"

This reverts commit 5d71030.

* Add button to toggle grayscale of current video (#788)

* Analysis HDF5 should prefer user-labeled instance over predicted instance (#772)

* Prefer same frame/track user-instances over predicted-instances when writing analysis hdf5

* Choose video to generate suggestions (#786)

Add option for users to select a certain video or all videos to generate suggestion(s) for.

* Add CLI sleap-render command to render videos (#796)

Sleap-render added to CLI & Updated docs

* Allow user to set grayscale when replacing videos (mp4/avi only)  (#787)

* Support grayscale for SingleImageVideo backend (#789)

* Fix h5py dependency (#815)

* Remove low-scoring predictions before merging inference results (#817)

* SLEAP v1.2.4

* SLEAP v1.2.4

No version left behind

* Remove cli.rst (back from the dead)

* Add read/write adaptor for ndx-pose (#835)

- Reads/writes predicted instances to NWB file.

* Change existing skeleton to match skeleton loaded via "Load Skeleton" button (#840)

* Fix Save As bug (#845)

* Update installation and labeling docs and no cuda yml (#847)

* Recalculate crop size if user-specified crop size indivisible by max stride (#841)

* Expose attributes of NWBFile and create Labels API for exporting to NWB (#855)

* SLEAP v1.2.5 (develop) (#856)

Update to SLEAP v1.2.5

* Fix NWB conda packaging (#860)

* Add pynwb and ndx-pose to conda packages

* Bump to v1.2.6

Co-authored-by: roomrys <38435167+roomrys@users.noreply.github.com>
Co-authored-by: sheridana <asheridan@salk.edu>
Co-authored-by: Arlo Sheridan <38435167+sheridana@users.noreply.github.com>
Co-authored-by: David Samy <96505813+davidasamy@users.noreply.github.com>
talmo added a commit that referenced this pull request Jul 26, 2022
SLEAP v1.2.6 (#862)

* Add support for new maDLC labels format (#678)

* Supervised Identity Prediction (#460) (#679)

* squash merge from roomrys/sleap-1 (#460)

* Add test dataset with tracks

* Add track indices to labels provider

* Add identity class map generator

* Update docstring

* Add class map model trainer, head and config

* Add inference

* Docs and tests for identity module
- Slightly modified matching to greedy-like behavior
* Fix inference
- Add imports to evals inference
- Move the common Predictor.predict() method to base class
- Fix docstrings for new inference classes
- Add test model and integration test

* Generate tracks from config metadata if not provided

* Force typecasting in identity functions

* Force boolean masking op

* Clean up inference module
- Move common Predictor methods to base class
- Switch to `model.predict_on_batch()` for massive performance increase
  with `predictor.predict()`.
- Enable prediction directly on arrays (slow)

* Enable Qt5Agg backend only when necessary during training

* Top-down supervised identity prediction (#476)

* Add sizematcher to new training pipelines

* Fix topdown ID visualization during training

* Add LabeledFrame.tracked_instances property for filtering
- Greedy checking in has_* properties

* Add Labels.copy() method for creating deep copies
- Works by serializing and deserializing to JSON (inefficient, but
  guaranteed to work since we have lots of coverage on I/O)

* Extract labels with tracked instances
- Add copy kwarg to extract to return deep copies
- Remove user and/or untracked instances in with_user_labels_only().
  Previously this functionality was blocked since we couldn't remove the
  instances from labeled frames without affecting the source labels.
- Add remove_untracked_instances() utility for filtering out instances
  from the labels.

* Add track filtering in LabelsReader provider
- This is slightly redundant with
  Labels.with_user_labels_only(..., with_track_only=True) but serves as
  an extra guarantee that we don't train on instances without tracks
  accidentally, regardless of how the data is preprocessed. Can still
  emit "empty" frames if no instances have tracks set, however.

* Add track filtering in DataReaders during training
- Auto-enabled when training from ID models
- Filters out instances without tracks BEFORE train/val splitting
- Split is now done on copy of labels
- Fix DataReaders arg typing
- Tests for DataReaders

* Add crop size detection to topdown ID models
- Add training integration test for topdown ID

* add removal of untracked instances for labeled instances (#460)

* Add removal of untracked instances for labeled instances
- previously used `LabeledFrame.tracked_instances()` which only returns predicted instances with tracking
- created `LabeledFrame.remove_untracked` which returns both user labeled and predicted instances with tracking
* Formatting
- using black v20.8b1

* add tests for Labels and LabeledFrames (#460)

* Add tests
- test `Labels.remove_untracked_instances()` for both cases of `remove_empty_frames: bool`
-test `LabeledFrames.remove_untracked()` for both user-labeled and predicted frames

* formatting (#460)

* add newline (no indent) at end of files which had failed Lint test

* clean-up comments and unneeded parenthesis (#460)

* Last merge fixes

* Lint

* Bump minor version (#684)

* Fix numpy conversion in inference (#687)

* Expose identity module in nn

* Override predict_on_batch to optionally cast data to numpy

* Fix topological sorting to always start with root node (#688)

* Fix topological sorting to always start with root node

* Add test

* Create unique default shortcuts (#686) (#690)

* Training monitor enhancements (#691)

* Training monitor enhancements
- Cleaned up imports
- Docstrings
- Now update based on time, not epochs
- Added markers for epoch-level losses
- Added best validation loss marker and text
- Reduced minimum possible y-axis value when log scaling
- Marker colors, alpha, sizes and line widths adjusted

* Move training monitor to gui submodule

* add metrics to training monitor title

* add mean time per epoch
* add ETA to finish next 10 epochs
* add plateau patience fraction (when in plateau)
* update dev_requirements to install version of click that does not break black

* Add code coverage

* add coverage for all lines within LossViewer.update_runtime()

Co-authored-by: roomrys <38435167+roomrys@users.noreply.github.com>

* add hide instance menu item and hotkey (#692)

* Single press of hotkey (H) toggles instance visibility

* Add instance visibility message/warning to status bar

* Resize keyboard shortcuts dialog box

* Fix formatting to read and save tracking scores (#693)

* Update formatting to include tracking_scores

* Add formatting fixtures, tracking_scores test

* Hide predicted instances with hotkey (#694)

* add hide instance menu item and hotkey

* single press of hotkey (H) toggles instance visibility

* Add instance visibility message to status bar

* Resize keyboard shortcuts dialog box

* Make shortcuts pop-up slightly narrower and taller

* Hide predicted instances as well

* hide predicted instances
* update status bar message:
- count only visible predicted and labeled instances
- only show "hidden instances" warning when number instances in frame is greater than 0
- normal font weight

* Logic update for detecting instances to show

* Add test for instance visibility

* Change which qtbot wait is used

* Change timeout of qtbot.waitActive

- attempt to pass ubuntu tests on github actions

* Use arbitrary qtbot.wait

Hope to verify that ubuntu test fails due to a waiting error

* Add test for instance colors

- predict ubuntu test will fail

* Add test skip mark for ubuntu

* Import pytest

* Skip test for linux

* Remove unused packages

* Talmo/pre v1.2.2 (#696)

* Change default tab appearance

* Bump to 1.2.2

* Add more notebooks to docs (#698)

* Fix missing links and update content

* Add new notebooks

* Add troubleshooting guide

* Datasets and paper link update

* Add support for new single animal DLC format (#704)

* Add support for single animal DLC files (#702)

* Add test for new format single animal DLC

* Add test images for visual verification

* Add data and test for old version single animal DLC file

* Add edges to analysis h5 (#707)

* Add edge names and edge indices to analysis h5

* Add test for node names and edge names in analysis h5 export

* Speed-up labeling suggestions look-up (#709)

* Use data cache to speed-up labeling suggestions

* Move logic from Labels.__getitem__ to Labels.get

* Use Labels.__getitem__ as a wrapper to Labels.get

* Add support for AlphaTracker import (#716)

* Add support for AlphaTrackor import

* Integrate adaptor into sleap

* Add tests

* Specify pip version in environment_no_cuda.yml

* Specify pip version in environment.yml

* Remove pip version from environment_no_cuda.yml

* Specify channel and version for pip in environment_no_cuda

* Add GUI-based test

* Add property tests and lint

* Delete condaenv.25edtblj.requirements.txt

Co-authored-by: Talmo Pereira <talmo@salk.edu>

* Update links from murthylab to talmolab (#724)

* Update links from murthylab to talmolab

* Add conda channel for pip install in no cuda yml

* Add try/except for release checker

* Update rest API link

* SLEAP v1.2.3 (#726)

* Update links from murthylab to talmolab

* Add conda channel for pip install in no cuda yml

* Add try/except for release checker

* Update rest API link

* Update pip in all environments

* Update to v1.2.3

* Fix typo on the datasets

Co-authored-by: sheridana <asheridan@salk.edu>

* Test CI

* Fix Imports in test_format.py (#732)

Co-authored-by: Talmo Pereira <talmo@salk.edu>

* Add links to discussion (#748)

* Update codecov badge token

* Add option to predict on all videos (#749)

* Contributing Guide, Code of Conduct, and Issues Template (#746)

* Add contributing draft

* Add code of conduct

* Add issues template

* Update bug_report.md

* Create codecov.yml

Split coverage into gui and non-gui counterpart

* Update codecov.yml

* Update codecov.yml

* Create multiple analysis files for multi-video projects (#768)

* Create occupancy matrix (h5) for single video at a time

* Write additional project metadata to the analysis file (for verification purposes)

* Add GUI option to export analysis of all videos

* Change `sleap-convert` to output one analysis file per video in project

* Use default filename for analysis files if multiple videos

Co-authored-by: Talmo Pereira <talmo@princeton.edu>

* Update tracking docs (#761)

* Convert gui and proofreading rst files to md
* Add section in proofreading for culling target instances
* Add propagate track labels docs to gui and proofreading

Co-authored-by: Arlo Sheridan <38435167+sheridana@users.noreply.github.com>

* Generate suggestions for videos with less frames than samples per video (#781)

* Add support for videos that have fewer frames than the Sample Stride length.

* Add support for videos that have less frames than the desired (random) Samples per Video (#783)

Allow suggestions to be generated randomly for all videos regardless of number of frames.

* Add button to toggle grayscale

* Revert "Add button to toggle grayscale"

This reverts commit 5d71030.

* Add button to toggle grayscale of current video (#788)

* Analysis HDF5 should prefer user-labeled instance over predicted instance (#772)

* Prefer same frame/track user-instances over predicted-instances when writing analysis hdf5

* Choose video to generate suggestions (#786)

Add option for users to select a certain video or all videos to generate suggestion(s) for.

* Add CLI sleap-render command to render videos (#796)

Sleap-render added to CLI & Updated docs

* Allow user to set grayscale when replacing videos (mp4/avi only)  (#787)

* Support grayscale for SingleImageVideo backend (#789)

* Fix h5py dependency (#815)

* Remove low-scoring predictions before merging inference results (#817)

* SLEAP v1.2.4

* SLEAP v1.2.4

No version left behind

* Remove cli.rst (back from the dead)

* Add read/write adaptor for ndx-pose (#835)

- Reads/writes predicted instances to NWB file.

* Change existing skeleton to match skeleton loaded via "Load Skeleton" button (#840)

* Fix Save As bug (#845)

* Update installation and labeling docs and no cuda yml (#847)

* Recalculate crop size if user-specified crop size indivisible by max stride (#841)

* Expose attributes of NWBFile and create Labels API for exporting to NWB (#855)

* SLEAP v1.2.5 (develop) (#856)

Update to SLEAP v1.2.5

* Fix NWB conda packaging (#860)

* Add pynwb and ndx-pose to conda packages

* Bump to v1.2.6

Co-authored-by: roomrys <38435167+roomrys@users.noreply.github.com>
Co-authored-by: sheridana <asheridan@salk.edu>
Co-authored-by: Arlo Sheridan <38435167+sheridana@users.noreply.github.com>
Co-authored-by: David Samy <96505813+davidasamy@users.noreply.github.com>

Co-authored-by: Talmo Pereira <talmo@salk.edu>
Co-authored-by: sheridana <asheridan@salk.edu>
Co-authored-by: Arlo Sheridan <38435167+sheridana@users.noreply.github.com>
Co-authored-by: David Samy <96505813+davidasamy@users.noreply.github.com>
@roomrys roomrys mentioned this pull request Jul 28, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants