-
Notifications
You must be signed in to change notification settings - Fork 96
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
Enforce projection bounds #1863
Enforce projection bounds #1863
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 #1863 +/- ##
=======================================================================
+ Coverage 74.17% 74.18% +0.01%
=======================================================================
Files 135 135
Lines 25387 25425 +38
=======================================================================
+ Hits 18831 18862 +31
- Misses 6556 6563 +7 ☔ View full report in Codecov by Sentry. |
0f9fe25
into
liezl/add-gui-elements-for-sessions
Description
Prior to this PR, when triangulating, if there were any views where nodes labeled in at least two views were out of frame in other views, then the node would be projected out of the visible video space. While the 3D to 2D projection may have technically been correct, this is not helpful to our user as they annotate images (perhaps to train a model which requires annotated points ON the video).
RecordingSession.projection_bounds
property and use inFrameGroup.upsert_points
This PR adds a
RecordingSession.projection_bounds
property which gathers the video height and width for eachVideo
linked to aCamcorder
in theRecordingSession
and returns a numpy array of shape (n_videos, 2). The projection bounds are then used inFrameGroup.upsert_points
to reset outlying points to NaN.Underlying
RecordingSession._projection_bounds
Each time
RecordingSession.add_video
orRecordingSession.remove_video
is called, the underlyingRecordingSession._projection_bounds
numpy is updated to either fill in theVideo.height
andVideo.width
for just theVideo
being added at the row index corresponding to the linkedCamcorder
's index inRecordingSession.camera_cluster.cameras
.Other (for easier testing): Expose
invisible_as_nan
attribute toFrameGroup.numpy
When testing for this feature, it was easier to know the underlying value (instead of getting
np.nan
) when callingFrameGroup.numpy
.Types of changes
Does this address any currently open issues?
[list open issues here]
Outside contributors checklist
Thank you for contributing to SLEAP!
❤️