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

Mergeing multiple brush annotations

Open BenBausch opened this issue 2 months ago • 1 comments

Problem: ML backends (e.g. Segement Anything) can sometimes propose annotions that only cover an object partially. The model can be prompted interactively to get an annotation for the remaining part of the object. However the object is now covered with two masks, which does not work in a setting where each mask should relate to one object instance.

Describe the solution you'd like A merge two brush annotations option for selected masks could solve this problem.

Describe alternatives you've considered The API call alternative to this problem is very user unfriendly.

BenBausch avatar Nov 17 '25 14:11 BenBausch

Hello,

Label Studio doesn’t have a built‑in “merge brush masks” action in the UI. Each detached brush stroke is saved as a separate region/instance, which is why you’re seeing multiple masks for what you consider a single object.

You could try:

  1. Post-process to merge masks (recommended for immediate use)
  • Export in Label Studio JSON, merge RLE masks per object, and write the merged result back.

A small script to use the SDK to merge those either post-process or a webhook trigger.

Thank you, Abu

Comment by Abubakar Saad Workflow Run

heidi-humansignal avatar Nov 25 '25 14:11 heidi-humansignal