
Real-time instance segmentation on an Image with an Ultralytics YOLO weights file. The sink resolves the projection: mask-plus-box pairs, outline-plus-box pairs, masks, boxes, parallel arrays, a merged Mask, a UInt64 count, or a colourised label Image.
Live segmentation overlay streamed to the browser.
Segment then track instances across frames.
Mask per instance, so their size grows with frame area times instance count. For dense scenes with hundreds of instances use the [(Polygon<Double>, BoundingBox)] arm: the largest contour of each instance in frame pixels, with no full-frame mask built at all. An instance whose mask traces no contour carries an empty outline.
Mask and the label Image arms each allocate one frame-sized canvas per frame; on the label image a later instance paints over an earlier one where they overlap. max_detections caps the instances kept per frame, highest confidence first, so a denser frame loses its least confident instances.
img_size should be close to the checkpoint's training resolution; a very different value silently degrades quality.
object_classes empty keeps every class while a non-empty list restricts detection to those ids, and class_thresholds overrides the confidence for specific classes with the rest falling back to threshold.
iou sets the overlap bound for non-maximum suppression, trading duplicate suppression against merging nearby distinct instances. agnostic_nms extends suppression across classes, keeping only the most confident instance per overlapping object.
max_detections included, are captured once at startup; changing any setting requires a redeploy.
live-test prerelease
Automated release