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.23k stars 2.28k forks source link

[Feature Request] Nested maxUsages and disabled Attributes for Taxonomy and Choice Tags #6026

Open ProfBrickz opened 2 months ago

ProfBrickz commented 2 months ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when using the Taxonomy tag in Label Studio and needing to limit the number of selections one level down. Currently, the maxUsages attribute restricts the total number of selections across all levels, which doesn't provide the granularity I need for specific use cases. Additionally, there's no straightforward way to disable certain choices within the taxonomy structure.

Describe the solution you'd like

I would like an attribute similar to maxUsages that limits the number of selections one level down in the Taxonomy tag. This attribute, which I'll refer to as maxLevelUsages, should allow setting specific limits for each level of the taxonomy. Furthermore, I would like the ability to disable certain choices using a disabled attribute within the Choice tag.

Describe alternatives you've considered

I have considered manually enforcing selection limits through external validation scripts, but this approach is cumbersome and not integrated within Label Studio's interface. Another alternative is nesting multiple Taxonomy tags with separate maxUsages attributes, but this complicates the labeling schema and user experience.

Additional context

Additional Attributes Requested

Example with Requested Features

This is a fictional example to illustrate how the feature might work conceptually

<Taxonomy name="Living Things" toName="image" maxLevelUsages="1">
  <Choice value="Animal" maxLevelUsages="2">
    <Choice value="Mammal" maxLevelUsages="2">
      <Choice value="Dog" />
      <Choice value="Cat" />
      <Choice value="Elephant" />
    </Choice>
    <Choice value="Bird" maxLevelUsages="1">
      <Choice value="Eagle" />
      <Choice value="Sparrow" />
    </Choice>
  </Choice>
  <Choice value="Plant" maxLevelUsages="2">
    <Choice value="Tree" maxLevelUsages="1">
      <Choice value="Oak" />
      <Choice value="Pine" />
    </Choice>
    <Choice value="Flower" maxLevelUsages="1" disabled="true">
      <Choice value="Rose" />
      <Choice value="Tulip" />
    </Choice>
  </Choice>
</Taxonomy>

Explanation

Please note that this example is purely fictional and simplified for illustrative purposes. Actual use cases and configurations may vary based on specific labeling tasks and requirements.

These enhancements, including the addition of the disabled attribute, would significantly enhance the flexibility of Label Studio for complex labeling tasks, improving user experience by allowing finer control over choice selections and reducing the need for manual enforcement of selection limits.

jombooth commented 1 month ago

/jira create

Workflow run Jira issue TRIAG-767 is created

jombooth commented 1 month ago

hi @ProfBrickz - thanks for this feature request! I'll discuss with the team.