Closed vaibhavtrip29 closed 8 months ago
The update to the SLEAP application's command module improves the logic for selecting instances to copy. It now differentiates between predicted instances and user-created instances, ensuring that the instance chosen for copying is the most appropriate one under the given conditions.
File | Summary |
---|---|
sleap/gui/commands.py |
Modified logic for finding and selecting instances to copy, distinguishing between predicted and user instances. Added find_last_user_instance method to AddInstance class. |
tests/gui/test_commands.py |
Added test_CopyPriorFrame function to test adding a user instance based on the previous frame's data. |
🐇✨ In the realm of code, a rabbit hopped, Tweaking the logic where instances are cropped. Now with a hop, a skip, and a user's guide, Predictions and creations stand side by side. 🌟🐾
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?
@coderabbitai review
Attention: 7 lines
in your changes are missing coverage. Please review.
Comparison is base (
14b5b78
) 73.38% compared to head (d567172
) 73.38%.
Files | Patch % | Lines |
---|---|---|
sleap/gui/commands.py | 63.15% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
… in prior frame rather than take the last instance in previous frame
Description
Instead of returning the copy_instance, first check if the copy_instance is a predicted instance in which case check the previous frame to see if it has any user instances. If so, set copy_instance to the last user instance in the previous frame.
Types of changes
Does this address any currently open issues?
[list open issues here] https://github.com/talmolab/sleap/issues/1065
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit
test_CopyPriorFrame
to validate the behavior of adding a user instance based on the previous frame's data.