HumanSignal / HumanSignal/label-studio

Multiple RectangleLabels components in a template create inconsistencies in handling bounding box labels

Open
#5,198 1 comment 0 reactions 0 assignees View on GitHub
community:bug community:reviewed
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
When creating a task that requires annotating many different classes, it makes sense to group them into categories and create different `RectangleLabels` one for each category of labels. However, when using multiple `RectangleLabels`, creating a bounding box with one label and then selecting a label from another category appears to only assign the later but actually maintains both. Adding an explicit `choice="single"` has no effect on this.

**To Reproduce**

1. Go to the [LabelStudio playground](https://labelstud.io/playground/) and select the `Bbox object detection` template.
2. Update the template with two separate `RectangleLabels`
```







```
3. Click on `Car` and create a bounding box in the image.
4. Click on `Airplane` to change the bounding box label.
5. Observe that the bottom panel only indicates the `Airplane` label as active but the right panel does show both.
6. Unselect then reselect the bounding box, observe that both labels are marked as active in both panels.

**Expected behavior**
- The default behavior of single choice label should propagate to multiple RectangleLabels, having multiple labels associated with a bounding box should only be possible when explicitly stating `choice="multiple"`.
- The active labels for a bounding box should be consistent across all panels at all times.

**Screenshots**

- After step 5:
![Screenshot 2023-12-14 at 1 08 47 PM](https://github.com/HumanSignal/label-studio/assets/476472/25c6b9a9-b4d0-4f30-aed9-4c78e47c54e7)
- After step 6:
![Screenshot 2023-12-14 at 1 08 57 PM](https://github.com/HumanSignal/label-studio/assets/476472/35cb9c1f-de88-4fde-b01b-094a0df3f402)

**Environment (please complete the following information):**
- OS: Linux
- Label Studio Version 1.7.0 and the current version used for playground.

**Additional context**
NB: with this template, I also cannot create a bounding box with the "Airplane" label in the playground although a similar design allows me to create a bounding box from any `RectangleLabels` in 1.7.0.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.