ryouchinsa / Rectlabel-support

RectLabel is an offline image annotation tool for object detection and segmentation.
https://rectlabel.com
511 stars 73 forks source link

Drawing boxes with specific aspect ratio #126

Closed mentezar closed 5 years ago

mentezar commented 5 years ago

Sometimes is useful (or better required) to draw bboxes with a specific aspect ratio. Suppose we want to draw only squares. It would be useful to have a way to specify the aspect ratio, for example 1 for drawing only squares. It should be and option in the main RectLabel window (not a settings option that causes me to to go setting section) because in the same image I need to draw, let's suppose, 6 square bboxes and 2 aspect-ratio-free bboxes.

Paying attention always to manually draw pixel-accurate square bboxes causes a huge loss of time.

So the above feature will be really time saving.

Thanks.

ryouchinsa commented 5 years ago

Thanks for writing the issue.

You can use "Use aspect ratio when draw boxes" on the Draw tab on the settings dialog. https://rectlabel.com/help#draw

This feature was requested by users who use the Haar-like feature. The same aspect ratio is used for the same object. So that this option is on the settings dialog.

Why do you have to draw squares for neural network tools?

For drawing squares, in the latest version 2.87, you can draw holding Shift key.

mentezar commented 5 years ago

Thanks for the shift key trick. Excellent.

Thanks for pointing me also to the already object => aspect ratio setting.

I have to annotate a small portion of my background to make some image preprocessing, simulating missing background (instead of setting it to zeros or others). Having this background bbox a square shape help me in the preprocessing pipeline. The final product of this preprocessing is then fed into a classification neural network with a common square input shape.