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

Could you add a feature for dragging or merging multiple selected rectangles? #499

Closed
lhj5426 opened this issue Jul 4, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@lhj5426
Copy link

lhj5426 commented Jul 4, 2024

Dear Developer,

I am using the annotation software you developed to annotate text on comic images. I am using YOLOv8 for training the model, which is still in its early stages. During the training and annotation process, there is a specific workflow. Please watch the video.

bandicam.2024-07-04.18-57-12-418.mp4

Because the model is in its early stages, it can recognize text but often incorrectly. You see, I have a bunch of rectangles here that I need to delete and then draw a new rectangle, and then modify it to the correct label. This process is very cumbersome.

So, I have a favor to ask. Could you please add a "select all and merge rectangles" feature like in video 2?

bandicam.2024-07-04.19-02-33-589.mp4

This way, it would greatly reduce the number of steps. I could directly select all, merge, and modify the labels, without having to delete each one individually by pressing the delete key. Could you consider this request? Thank you.

@CVHub520
Copy link
Owner

CVHub520 commented Jul 4, 2024

Got it! 💯

@CVHub520
Copy link
Owner

CVHub520 commented Jul 4, 2024

Hey there! @lhj5426😊,

I'm super excited to announce that the feature you've been asking for 🙌 - the ability to merge multiple rectangle shapes into a single shape representing their union - has now been implemented and pushed to the GitHub repository 🎉.

To try out this new feature, here's what you need to do:

  1. Pull the latest source code from the repository to ensure you have the updated version 🔄.
  2. Select the rectangle shapes you want to merge by holding down the Ctrl key while clicking on them with your mouse 🖱️.
  3. Once you have multiple shapes selected, hold down Ctrl and right-click on the canvas. You will see a context menu where you can choose the "Union Selection" option 📏.

After selecting "Union Selection," the tool will create a new shape that represents the union of the selected rectangles. Please let me know if you encounter any issues or have further questions about this feature 🤝.

Happy labeling! 😃

23-26-42.mp4

@lhj5426
Copy link
Author

lhj5426 commented Jul 4, 2024

Hey there! @lhj5426* 😊,

I'm super excited to announce that the feature you've been asking for 🙌 - the ability to merge multiple rectangle shapes into a single shape representing their union - has now been implemented and pushed to the GitHub repository 🎉.

To try out this new feature, here's what you need to do:

  1. Pull the latest source code from the repository to ensure you have the updated version 🔄.
  2. Select the rectangle shapes you want to merge by holding down the Ctrl key while clicking on them with your mouse 🖱️.
  3. Once you have multiple shapes selected, hold down Ctrl and right-click on the canvas. You will see a context menu where you can choose the "Union Selection" option 📏.

After selecting "Union Selection," the tool will create a new shape that represents the union of the selected rectangles. Please let me know if you encounter any issues or have further questions about this feature 🤝.

Happy labeling! 😃

23-26-42.mp4

I really appreciate your response, developers.
Thank you so much.
And then I have two questions. Could you take a look at them?

bandicam.2024-07-05.00-22-43-309.mp4

Sometimes, the trained model recognizes a situation where a large rectangle contains many smaller rectangles.
In such cases, it is impossible to select the smaller rectangles under the large rectangle.
As a result, it is not possible to use Ctrl to select and merge them.
This is one issue.
Is this possible to solve?
Another issue is, could you please add a shortcut key for merging rectangles?

image

When I am labeling, I use a small keypad that allows for custom button functions.
If you could add a shortcut key, users could conveniently use the shortcut to quickly merge rectangles,
instead of having to right-click the menu and click to merge each time.
Could you please consider adding a shortcut key?
image

Any shortcut key would be fine, as I am using a keypad that can customize functions.

Thank you very, very much!

@lhj5426
Copy link
Author

lhj5426 commented Jul 4, 2024

Also, although clicking is convenient, sometimes when there are many rectangles that I want to merge, I have to hold down Ctrl and then precisely click each rectangle. This operation is not very user-friendly. If it were possible to hold down Ctrl and drag to select multiple rectangles, and then release Ctrl while still being able to use the merge option in the menu, it would be much more user-friendly. Holding down Ctrl all the time makes it easy to forget that you need to hold down Ctrl and then right-click to activate the function. Could you please optimize this operation logic? Sorry for the trouble.

@lhj5426
Copy link
Author

lhj5426 commented Jul 4, 2024

After selecting, I habitually release the Ctrl key because, in Windows, you typically release Ctrl after making a selection. Out of habit, I subconsciously release it. Then I realize that the merge option in the right-click menu is not activated, so I have to go back, hold down Ctrl again, click the rectangles, and this time remember not to release Ctrl before using the right-click menu. But then I forget again the next time. I repeated this process many times in one evening. This interaction is really not very user-friendly.

@lhj5426
Copy link
Author

lhj5426 commented Jul 4, 2024

Or, by holding down the Alt key, you can draw a rectangle to select multiple rectangles that fall within the drawn area, and then merge them directly when you release the left mouse button.

@lhj5426
Copy link
Author

lhj5426 commented Jul 4, 2024

Ctrl + left-click is for selecting individual items, then right-click to merge. Alt + drag is for bulk selecting items to merge directly. These two interaction logics are both user-friendly.

@CVHub520
Copy link
Owner

CVHub520 commented Jul 5, 2024

Hi, there! 👋

Thank you for your detailed feedback and constructive suggestions. Here are the responses to the issues you raised:

  1. Occlusion issue: Indeed, selecting shapes when larger shapes overlap smaller ones can be cumbersome. Currently, you can use the shortcut key 's' to temporarily hide the topmost shape to access the ones underneath. We will further evaluate this issue and consider optimizations in future versions to more conveniently handle occlusions.

image

  1. Shortcut key for merging rectangles: Your suggestion to add a shortcut key for merging rectangles is very practical. We will take this into consideration for future updates, allowing users to customize shortcut keys according to their preferences and device capabilities, thereby enhancing the labeling efficiency.

  2. Selection and merging operation optimization: Your insights on the operation logic for selecting multiple rectangles and merging them are highly valuable. We will explore ways to optimize the use of the merge option in the right-click menu while maintaining the Ctrl key selection, in order to reduce the number of steps and cognitive load for users. Additionally, we will consider incorporating a feature similar to the one you suggested, where holding down the Alt key allows you to drag and select multiple rectangles for direct merging, providing a more user-friendly experience.

We highly appreciate your feedback as it helps us continuously improve our product and service. Thank you for your understanding and patience. I will strive to address these issues in future updates and continue optimizing X-AnyLabeling. If you have any further suggestions or questions, please feel free to contact me.

@lhj5426 lhj5426 closed this as completed Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants