Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brush tool example not working #7105

Open
johan-sightic opened this issue Feb 18, 2025 · 2 comments
Open

Brush tool example not working #7105

johan-sightic opened this issue Feb 18, 2025 · 2 comments

Comments

@johan-sightic
Copy link

Describe the bug
Brush tool example does not work

To Reproduce
Copy example from https://labelstud.io/tags/brush#Example

Expected behavior
What is the difference between Brush and BrushLabel? I'm not sure what is expected

Screenshots
Image

Environment (please complete the following information):

  • OS: Ubuntu 24
  • Label Studio Version: 1.16.0
  • Browser: Google Chrome
@heidi-humansignal
Copy link
Collaborator

Hello,

Thank you for contacting Label Studio!

I understand you're experiencing issues when copying the example from the documentation and would like clarification on the differences between the two tags.

Key Differences Between Brush and BrushLabels

Brush Tag:

  • This tag provides a fundamental brush tool for drawing segmentation masks on images.
  • It is designed solely for drawing and does not inherently handle label management.
  • It functions as a low-level tool, meaning brush strokes are applied without being automatically linked to specific labels.

BrushLabels Tag:

  • This tag integrates the brush tool with built-in label management.
  • By nesting <Label> elements within BrushLabels, you can explicitly define the labels associated with the drawn mask.
  • It is the recommended approach for image segmentation, as it ensures that each brush stroke is automatically linked to a specific label.
  • Recent Label Studio versions favor this method for maintaining consistency in both annotation and export workflows.

Example Comparison

Instead of using the standalone Brush tag:

<View> <Brush name="labels" toName="image"> <Label value="Person" /> <Label value="Animal" /> </Brush> <Image name="image" value="$image" /></View>

It is recommended to use the BrushLabels tag for better integration:

<View> <BrushLabels name="labels" toName="image"> <Label value="Person" /> <Label value="Animal" /> </BrushLabels> <Image name="image" value="$image" /></View>

By using BrushLabels, brush strokes are automatically associated with predefined labels, ensuring a more seamless and efficient annotation process.
Let me know if you need any further clarification or assistance with your project setup.

Comment by Oussama Assili
Workflow Run

@johan-sightic
Copy link
Author

Can I use interactive annotation with BrushLabels I see no smart property?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants