Skip to content

Add confidence to SingleInstanceSegmentation - #90

Open
liopeer wants to merge 1 commit into
mainfrom
add-instance-segmentation-confidence
Open

liopeer wants to merge 1 commit into
mainfrom
add-instance-segmentation-confidence

Conversation

@liopeer

@liopeer liopeer commented Oct 11, 2026

Copy link
Copy Markdown

SingleObjectDetection has an optional confidence. SingleInstanceSegmentation had none, so a model's mask scores had nowhere to go. This adds the same field to instance segmentation.

  • SingleInstanceSegmentation.confidence: float | None = None. It is checked to lie in [0, 1], the same as for detection.
  • COCO instance segmentation reads score into it and writes it back, the same as COCO object detection.
  • Existing code is unaffected, because the field defaults to None.

Why now: lightly-modelrepo is adding a client that returns SAM3 masks as labelformat objects, for lightly-studio. Each mask comes with a score.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant