Skip to content

Add wrapper for ultralytics yolo for instance segmentation task#601

Open
kprokofi wants to merge 5 commits into
masterfrom
kprokofi/yolo-seg
Open

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

Conversation

@kprokofi
Copy link
Copy Markdown
Contributor

@kprokofi kprokofi commented Jun 3, 2026

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
Copy link
Copy Markdown
Contributor Author

kprokofi commented Jun 3, 2026

Verified in application:
image

@kprokofi
Copy link
Copy Markdown
Contributor Author

kprokofi commented Jun 3, 2026

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
Copy link
Copy Markdown
Contributor

AlexanderBarabanov commented Jun 5, 2026

The issue has been fixed in #595 @kprokofi

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.

2 participants