Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions label_studio_ml/examples/grounding_sam/dino.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ def predict(self, tasks: List[Dict], context: Optional[Dict] = None, **kwargs) -
if not context or not context.get('result'):
# if there is no context, no interaction has happened yet
return []

if len(context['result'][0]['value']['text']) > 1:
# workaround for labelstudio running interactive annotations on submit
return []

from_name_r, to_name_r, value = self.get_first_tag_occurence('RectangleLabels', 'Image')
from_name_b, to_name_b, _ = self.get_first_tag_occurence('BrushLabels', 'Image')
Expand Down
Loading