-
Notifications
You must be signed in to change notification settings - Fork 100
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
Use oks score for reprojections #1836
Use oks score for reprojections #1836
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## liezl/add-gui-elements-for-sessions #1836 +/- ##
=======================================================================
+ Coverage 74.10% 74.16% +0.05%
=======================================================================
Files 135 135
Lines 25345 25368 +23
=======================================================================
+ Hits 18782 18813 +31
+ Misses 6563 6555 -8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just made some comments about a print statement and cleaning up a comment
# The score of instances will NOT be updated on initialization. | ||
for instance in instance_group_from_dict.instances: | ||
if isinstance(instance, PredictedInstance): | ||
assert instance.score != instance_group_from_dict.score | ||
|
||
# Test `__repr__` | ||
print(instance_group) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean to leave this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the __repr__
method is used when calling print
…-score-to-reprojections
…-score-to-reprojections
16e775d
into
liezl/add-gui-elements-for-sessions
Description
This PR does 3 main things (described in more detail further down):
PredictedInstance.score
sInstanceGroup.score
attributeInstanceGroup.score
in tableAdditionally, to use the
sleap.nn.evals.compute_oks
function inside asleap.io
file, we needed to move thecompute_oks
function tosleap.util
to avoid a circular import betweensleap.nn
andsleap.io
files.Use same OKS score for all
PredictedInstance.score
sPreviously, all the
PredictedInstances
created and updated through (re)projection had a default nan score. This PR uses an average oks (calculated from ground truthInstance
s and their reprojections) as the score for all (re)projectedPredictedInstance
s.Add
InstanceGroup.score
attributeTo be most correct, even the
Instance
s which have reprojected nodes should have a score associated with them. There is currently noInstance.score
attribute, and since this score really applies to the entireInstanceGroup
(not just thePredictedInstance
s in theInstanceGroup
), this PR also adds anInstanceGroup.score
attribute that is updated each time we callInstanceGroup.update_points
.Display
InstanceGroup.score
in tableThis
InstanceGroup.score
is likely the most useful information for users to see, so this PR also adds a score column to the table displaying InstanceGroup information.Types of changes
Does this address any currently open issues?
[list open issues here]
Outside contributors checklist
Thank you for contributing to SLEAP!
❤️