-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* 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
- Loading branch information
Showing
34 changed files
with
4,373 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.