Skip to content
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

Enhance Annotation Layer Changes: Relative zOrder Updates #9063

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

arianizadi
Copy link

@arianizadi arianizadi commented Feb 6, 2025

Motivation and context

Closes #9064
The current method of moving objects in CVAT using absolute placements (sending them directly to the front or back) can be disorienting and unpredictable. When repeatedly moving an object backward, it can continue to shift unexpectedly, making it difficult to track and control its position accurately.

This update introduces a relative movement approach, allowing users to adjust an object’s z-order one layer at a time. Instead of jumping directly to the back or front, users can precisely move objects step-by-step, ensuring greater accuracy and control over the annotation layout. This prevents unwanted drastic changes and makes object layering more intuitive and predictable.

By constraining the movement within minZLayer and maxZLayer, this solution also prevents objects from going out of bounds, further improving usability.

How has this been tested?

I had tested by rebuilding and using the functionality for my semantic segmentation tasks. Just by testing the keybinds and buttons in multiple images.

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Copy link

sonarqubecloud bot commented Feb 6, 2025

@arianizadi arianizadi changed the title Enhance Annotation Layer Changes: Relative zOrder Updates Enhance Annotation Layer Changes: Relative zOrder Updates - Closes #9064 Feb 6, 2025
@arianizadi arianizadi changed the title Enhance Annotation Layer Changes: Relative zOrder Updates - Closes #9064 Enhance Annotation Layer Changes: Relative zOrder Updates Feb 6, 2025
@arianizadi
Copy link
Author

Would this kind of change need a test? I did not find any tests for the previous implementation.

@arianizadi arianizadi marked this pull request as ready for review February 6, 2025 06:53
@klakhov
Copy link
Contributor

klakhov commented Feb 6, 2025

Hi,
Moving objects between layers could be a useful feature. However, I don’t think we should completely remove the To Background and To Foreground functions. What do you think about adding additional shortcuts or buttons to support moving objects between layers?

An e2e test would be much appreciated. You can find basic tests for z order here

@klakhov klakhov added the ui/ux label Feb 6, 2025
@arianizadi
Copy link
Author

That makes sense. I will try to fix that and write the tests. Thank you!

@arianizadi arianizadi marked this pull request as draft February 6, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve zOrder Handling for Object Layer Movement
2 participants