-
Notifications
You must be signed in to change notification settings - Fork 93
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
New label placed outside the frame #1551
Comments
Hi @roaldarbol, I have an inkling that this shifting of predictions likely has to do with the
Let me know if you need more guidance/clarification. Thanks, |
Hi @roomrys! Thanks for the reply! |
Ah yes, thanks for clarifying! I was definitely adding in my own assumptions (and overlooked the number of labeled frames in the project). This is a case that we haven't covered! While we have a bit of code to ensure that non-visible points are initialized within the frame, SLEAP just copies the visible points from the Lines 2951 to 2957 in 1e0627a
We would need to add a check here that ensures the point is within the current frame... maybe shifting all points over to fit in the current frame. Until this is fixed and released, using the force-directed method to add an instance should add the points at the location you are right-clicking. |
Yeah, that sounds just right - I think you've nailed the root of the issue, and your proposed fix sounds exactly like what I'd expect! I think you could just include a scaling factor like |
Bug description
I am labelling videos of different frame sizes in sleap v1.3.3, and when I move a large frame to a small frame and add a new instance, the labels are placed based (it seems to me) based on the previous positions in pixels. However, because the new frame is much small, some labels are moved outside the new frame and are impossible to re-position (there's the Alt/Option trick from #896 (comment), to move the entire instance as a workaround ).
Expected behaviour
I would expect the new labels to be placed in relative position. So if the previous frame was 2000pixels wide and a point was at 1000, then in a frame 500px wide, it should be placed at 250. Similarly the other way around.
Actual behaviour
In the above example it seems to be placed at px 1000 still in the new frame, which is then outside the frame.
Your personal set up
macOS 13.6
Environment packages
Screenshots
How to reproduce
The text was updated successfully, but these errors were encountered: