HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
18.1k stars 2.26k forks source link

Multi-selection for label instances not working #4275

Open e-dzia opened 1 year ago

e-dzia commented 1 year ago

Describe the bug When labelling data with bounding boxes and choice labels (per region) it should be possible to label multiple objects at once. This is not possible at the moment - when I select multiple objects, the choice label disappears.

To Reproduce Steps to reproduce the behavior:

  1. Create a project with labelling template:
    <View>
    <Image name="image" value="$image"/>
    <RectangleLabels name="label" toName="image">
    <Label value="Airplane" background="green"/>
    <Label value="Car" background="blue"/>
    </RectangleLabels>
    <Choices name="color" toName="image" perRegion="true" choice="single">
    <Choice value="blue"/>
    <Choice value="white"/>
    <Choice value="yellow"/>
    </Choices>
    </View>
  2. Draw a few objects/regions of any type.
  3. Select more than one object at once,
  4. The "color" choice tag is not visible anymore.

Expected behavior The choice label shouldn't disappear. It should be possible to add a label to multiple objects/regions at once.

Screenshots When choosing one object the color choice is visible: Zrzut ekranu 2023-05-30 122249 When choosing multiple objects the color choice is not visible: Zrzut ekranu 2023-05-30 122304

Environment (please complete the following information):

Additional context This is not in accordance with the documentation - this functionality was introduced in version 1.3 - https://github.com/heartexlabs/label-studio/issues/655

AbubakarSaad commented 1 year ago

Hello e-dzia,

Try removing "preRegion" attribute from. PerRegion attribute works if you select a certain region. If you do it without it, it will select for all the regions.

e-dzia commented 1 year ago

Hello AbubakarSaad!

The thing is I don't want to label all of the regions at once. There can be 3 white and 5 blue airplanes in one picture and I'd like to label them by selecting first white airplanes and labelling them and then blue airplanes and labeling them. I cannot see it working this way right now.

AbubakarSaad commented 1 year ago

Sorry for the late reply, but you can use "choice=multiple" and remove the "perRegion" attribute as that doesn't support multiple region:


  <Image name="image" value="$image"/>
  <RectangleLabels name="label" toName="image">
    <Label value="Airplane" background="green"/>
    <Label value="Car" background="blue"/>
  </RectangleLabels>
  <Choices name="color" toName="image" choice="multiple">
    <Choice value="blue"/>
    <Choice value="white"/>
    <Choice value="yellow"/>
  </Choices>
</View>```