Handle individual-wise confidence during DLC/LP export#1017
Open
ishan372or wants to merge 2 commits into
Open
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1017 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 41 41
Lines 2829 2835 +6
=========================================
+ Hits 2829 2835 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.



Description
What is this PR
Why is this PR needed?
Datasets with individual-wise confidence scores could not be exported to
DeepLabCut(DLC) orLightningPoseformats. Exporting such datasets resulted in a dimension mismatch error because these formats expect keypoint-wise confidence scores.What does this PR do?
Expands individual-wise confidence scores to keypoint-wise confidence scores by assigning the same confidence value to all keypoints belonging to an individual. Emits a
logger.warninginforming users that the conversion is being performed and that the original individual-wise confidence representation will not be preserved when the exported file is reloaded. Adds tests covering DLC and LightningPose exports with individual-wise confidence scores.References
#1003
How has this PR been tested?
Reproduced the issue locally using a dataset with individual-wise confidence scores.
Verified that
save_poses.to_dlc_style_df()no longer raises an exception.Verified that
save_poses.to_dlc_file()successfully exports datasets with individual-wise confidence scores.Verified that
save_poses.to_lp_file()successfully exports datasets with individual-wise confidence scores.Is this a breaking change?
No.
Does this PR require an update to the documentation?
Yes.
This PR introduces a new export behaviour for datasets with individual-wise confidence scores. When exporting to formats that only support keypoint-wise confidence scores, individual-wise confidence scores are expanded to all keypoints belonging to an individual.
Checklist: