Add First Pass Tracking Functionality#33
Open
emdavis02 wants to merge 15 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
===========================================
- Coverage 44.73% 20.81% -23.92%
===========================================
Files 8 9 +1
Lines 930 2066 +1136
===========================================
+ Hits 416 430 +14
- Misses 514 1636 +1122 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
talmo
reviewed
Jul 16, 2025
| @@ -188,12 +192,20 @@ def extract_tracking_data(self, labels): | |||
| # Initialize a dictionary for this row with 'frame_idx' and 'track' | |||
| row = {"frame_idx": frame_data.frame_idx, "track": inst.track.name} | |||
| for point in inst.points: | |||
Contributor
There was a problem hiding this comment.
Could do something like:
cols = [*[f"{node_name}.x", f"{node_name}.y", f"{node_name}.score"] for node_name in skeleton.node_names]
pd.DataFrame(inst.numpy(scores=True).reshape(-1), columns=cols)…tracker classes - updated environment - Expanded docstrings in the FeatureTracker class to include detailed argument descriptions. - Implemented force matching for untracked instances in the Tracker class, including methods for resolving track IDs and finding closest global track instances. - Improved handling of untracked instances and global tracks during tracking process.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
The
sleap-motrepo currently supports tracking pose-estimated videos either:First-pass tracking uses visible features or external signals to assign partial identities (tracklets) to animals when those features are available. For example:
Previously, these feature-based tracking methods were implemented in scattered Jupyter notebooks. The goal of this PR is to incorporate them directly into the
sleap-motrepository, enabling it to function as a complete identity tracking pipeline, from raw pose data to globally consistent tracks.Key Changes
FeatureTrackerbase classThis abstract base class defines shared functionality and interfaces for all feature-based tracking approaches. It includes:
track()that must be implemented differently in each subclass depending on the feature typeImplemented subclasses:
RFIDFeatureTrackerThis subclass demonstrates how specific feature-based methods (in this case, RFID-based) can be cleanly integrated using the inherited structure and shared utilities from
FeatureTracker.FurColorFeatureTrackerTest functions will be written to test the functionality of these new classes in tandem with the tracker class (second step tracking)
Outcome
This PR formalizes and integrates feature-based first-pass tracking into the core
sleap-motpackage. It lays the groundwork for a modular, extensible identity tracking system, where multiple feature types (e.g., color, RFID, embeddings) can be easily added and composed.