image.manual behaves user unfriendly near borders

When drawing rectangles in image.manual view_id, the UI behaves unfriendly near borders.

  1. When an annotator is drawing a rectangle and goes beyond the edge with the mouse, he "loses focus" on the rectangle, and the rectangle does not "lock-in" when he stops holding the left mouse button. Annotators have to stop holding the left mouse button inside of the image, which, when the intention is to draw the rectangle all the way to the edge of the image, results in searching for the perfect pixel, so that the mouse is at the edge of the image but not outside of the image, as then the UI would not allow creating the box.

With the first problem, it is easier to first draw an unprecise rectangle inside the bounds of the image, and then stretch it to the edge, which leads to the second problem, which is, in my opinion, a bug:

  1. When stretching the rectangles, it is possible to go beyond the borders and the db also saves these annotations, meaning there can be rectangles in the database that go beyond the image boundaries. So, a rectagle whose x coordinate can be negative or higher than the width of the image.

I have included a screenshot of the stretched rectangles.

What I would like is a user-friendly way to draw rectangles that lead all the way to the border (like the blue one).

Thanks for the detailed report – I think I know what you mean and I agree, it's pretty fiddly at the moment to annotate a box that aligns exactly with the image boundaries.

I'll have to play around with this and see what the best solution is :slightly_smiling_face: I think the most intuitive behaviour would be if releasing the click and drag outside of the image would just lock in the bounding box at the last possible pixel. And I think there should at least be an option to make it "illegal" to move a shape outside of the image area. (Maybe there are use cases where it does make sense to allow this, so we could make it a setting.)

1 Like

I agree, that would be the most intuitive solution.

With the right border of the image, for example, the annotator should be able to "communicate" his intention of wanting to cover the pixels all the way to the edge by moving the mouse outside of the image and then be able to specify the y coordinate by moving the mouse up and down outside of the image and then lock in when he is satisfied with the result.

As for the use cases where it would make sense to allow drawing shapes outside of the boundaries of the image, there may be some, but the current UI does not cater to them either - the user can only guess how do the shapes outside of the image look, as they are not visible.