cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
12.25k stars 2.95k forks source link

add option to disable box rotation #5582

Open manybodycpa opened 1 year ago

manybodycpa commented 1 year ago

My actions before raising this issue

Expected Behaviour

Provide an option to use rectangular bounding boxes with fixed angle zero (as in previous CVAT versions).

Current Behaviour

Annotators may rotate a box on purpose or accidentally. There is no way to disable this option. Steps have to be taken to avoid problems with rotated boxes (see below).

Possible Solution

The following comes to mind:

Context

A rectangular bounding box is defined in terms of the coordinates of two of its corners. However, the standard definition assumes that the rectangle's sides are parallel to the image borders. If a nonzero angle is allowed, the coordinates acquire a new meaning that, if ignored, will lead to incorrect results. Since rotated rectangular bounding boxes are (to my knowledge) not commonly used and do not solve the problem of distorted objects (which need non-rectangular boxes), it seems problematic to make rotatable boxes the default. Annotators may rotate by accident, which has to be checked and fixed later on. Moreover, the white rotation handles sometimes get in the way.

bsekachev commented 1 year ago

Hi @manybodycpa

Thank you for the feedback. I believe it might be a part of labels specification (like recently we added "type" for labels which may be "box", "polygon", "cuboid", etc.

Adding a simple setting like in the second option is not 100% guarantee that annotators will not rotate boxes..

Let's see if somebody can suggest a proposal and implement it.

dschoerk commented 1 year ago

I'd appreciate to have a settings for this. It happens rarely, but sometimes I did rotate boxes on accident.