8000 Add ID models by gitttt-1234 · Pull Request #234 · talmolab/sleap-nn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add ID models #234

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

Merged
merged 10 commits into from
Jul 10, 2025
Merged

Add ID models #234

merged 10 commits into from
Jul 10, 2025

Conversation

gitttt-1234
Copy link
Collaborator

This PR adds support for appearance-based tracking by introducing ID models for both Bottom-Up and Top-Down architectures.

Bottom-Up ID Model:
This model extends the standard Bottom-Up approach by replacing PAFs with multi-class segmentation maps ("classmaps"). Instead of explicitly grouping keypoints, the model predicts the probability that each keypoint belongs to a specific animal ID. Identity assignment is performed via optimal matching of class probabilities, making explicit grouping unnecessary.

Top-Down ID Model:
In this model, we extend the standard centered-instance pipeline by adding a classification head that predicts animal identity for each centroid-cropped image. Identity classification is computed from the features of the deepest layer of the encoder (the model to learn appearance-based features). The resulting class probabilities are then used to assign instance identities via optimal matching.

Copy link
codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 95.38653% with 37 lines in your changes missing coverage. Please review.

Project coverage is 96.40%. Comparing base (1115ed4) to head (2ef248b).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
sleap_nn/inference/predictors.py 93.03% 20 Missing ⚠️
sleap_nn/train.py 25.00% 6 Missing ⚠️
sleap_nn/training/model_trainer.py 84.21% 3 Missing ⚠️
sleap_nn/data/custom_datasets.py 98.44% 2 Missing ⚠️
sleap_nn/training/lightning_modules.py 98.73% 2 Missing ⚠️
sleap_nn/data/identity.py 96.42% 1 Missing ⚠️
sleap_nn/inference/bottomup.py 97.36% 1 Missing ⚠️
sleap_nn/inference/identity.py 98.27% 1 Missing ⚠️
sleap_nn/inference/topdown.py 97.14% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #234      +/-   ##
==========================================
- Coverage   96.58%   96.40%   -0.19%     
==========================================
  Files          45       47       +2     
  Lines        5153     5922     +769     
==========================================
+ Hits         4977     5709     +732     
- Misses        176      213      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gitttt-1234 gitttt-1234 merged commit 8286789 into main Jul 10, 2025
6 checks passed
@gitttt-1234 gitttt-1234 deleted the divya/id-models branch July 10, 2025 17:39
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.

1 participant
0