label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

perRegion labels do not display in the labeling interface

Open mihow opened this issue 2 years ago • 3 comments

Describe the bug When using the Taxonomy or Choices tag with perRegion="true", the value the selected label is never displayed in the Label Studio interface. Our annotators would like to see the labels they have chosen for all regions in the image before submitting. I can see them in the data exported, just not in the UI.

To Reproduce Use the following labeling template:

<View>

  <RectangleLabels name="label" toName="image">
    <Label value="Moth" background="green"/>
    <Label value="Non-Moth" background="blue"/>
  </RectangleLabels>
  
  <View whenlabelvalue="Moth">
    <Taxonomy name="species" placeholder="Select species..." toName="image" showFullPath="true" pathSeparator="&gt; " perRegion="true" required="false">
      <Choice value="Lepidoptera">
        <Choice value="Adelidae">
          <Choice value="Adela sp.">
            <Choice value="Adela caeruleella"></Choice>
            <Choice value="Adela ridingsella"></Choice>
          </Choice>
          <Choice value="Harrisina sp.">
            <Choice value="Harrisina americana"></Choice>
          </Choice>
        </Choice>
      </Choice>
    </Taxonomy>  
  </View>
  
  <Image name="image" value="$image"/>
  
</View>

Expected behavior I would expect these might show up under "Selection Details" in the sidebar.

Screenshots Screenshot from 2023-09-05 16-49-13

Environment (please complete the following information):

  • OS: Ubuntu 22.04
  • Label Studio Version: 1.8.2

@hlomzik am I missing something obvious?

mihow avatar Sep 09 '23 03:09 mihow

Hi @mihow, have you resolved this? I am having a similar issue.

simonabisiani avatar Oct 04 '24 08:10 simonabisiani

Hey @mihow! Thank you for raising this, it feels like missing piece, I agree! It should be as easy as adding a new type here: https://github.com/HumanSignal/label-studio/blob/develop/web/libs/editor/src/components/SidePanels/DetailsPanel/RegionDetails.tsx#L30-L70 And apparently Choices should be displayed there. You can create a PR or we'll look into it soon.

hlomzik avatar Oct 04 '24 12:10 hlomzik

/jira create leap

Workflow run Jira issue TRIAG-898 is created

hlomzik avatar Oct 04 '24 12:10 hlomzik

Confirming I have the same issue. For those coming here couple thoughts, the docs make it seem like 'labeling'=true is the desired syntax, I find that perRegion='true' is sufficient. You cannot see the selections, but they do get recorded.

<View>
  <Image name="image" value="$image"/>
      <RectangleLabels name="label" toName="image">
  <Label value="Object" background="#D4380D"/>
<Label value="FalsePositive" background="#FFA39E"/></RectangleLabels>
<View>
  <Text name="text" value="Select Taxonomy for Classification"/>
  <Taxonomy name="taxonomy" perRegion='true' minWidth="600px" toName="image" apiUrl="https://raw.githubusercontent.com/weecology/BOEM/refs/heads/main/transformed_taxonomy.json" />
</View>

</View>

bw4sz avatar Mar 06 '25 22:03 bw4sz

+1

serranom avatar Aug 27 '25 23:08 serranom