Skip to content

Add wrapper for ultralytics yolo for instance segmentation task#601

Merged
kprokofi merged 5 commits into
masterfrom
kprokofi/yolo-seg
Jun 8, 2026
Merged

Add wrapper for ultralytics yolo for instance segmentation task#601
kprokofi merged 5 commits into
masterfrom
kprokofi/yolo-seg

Conversation

@kprokofi

@kprokofi kprokofi commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Add YOLOSeg — a YOLO instance-segmentation model wrapper. It is needed for YOLO26 integration to Geti

Changes

  • src/model_api/models/yolo_seg.py — New YOLOSeg(DetectionModel) class (model = "YOLO-seg"):
    • init validates 1 input / 2 outputs, identifies detection (rank-3) and prototype (rank-4) tensors
    • parameters() inherits full NMS chain from DetectionModel, sets YOLO-specific defaults
    • postprocess() parses detection output → confidence filter → NMS → mask decoding (coefficients @ prototypes → sigmoid → crop → resize) → coordinate scaling → returns InstanceSegmentationResult
  • tests/unit/models/test_yolo_seg_model.py — 8 unit tests covering init validation, parameters, postprocessing (no detections, with detection, multiple detections), and crop_mask

@kprokofi kprokofi requested a review from a team as a code owner June 3, 2026 16:07
@github-actions github-actions Bot added tests Related to tests python python related changes labels Jun 3, 2026
@kprokofi

kprokofi commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Verified in application:
image

@kprokofi

kprokofi commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Not sure about serving_api-tests. "docker: error pulling image configuration: download failed after attempts=6: dial tcp 54.185.253.63:443: connect: connection refused". Probably not related to my changes

@AlexanderBarabanov

AlexanderBarabanov commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

The issue has been fixed in #595 @kprokofi

@kprokofi kprokofi added this pull request to the merge queue Jun 8, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 8, 2026
@tybulewicz tybulewicz added this pull request to the merge queue Jun 8, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 8, 2026
@kprokofi kprokofi added this pull request to the merge queue Jun 8, 2026
Merged via the queue into master with commit db22603 Jun 8, 2026
52 of 54 checks passed
@kprokofi kprokofi deleted the kprokofi/yolo-seg branch June 8, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python python related changes tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants