
Generic overlay renderer. Accepts a base Image plus bounding boxes, segmentation masks, bare boolean masks, landmarks, points, polygons, vectors, or caption strings and stacks all overlays in input order, emitting the composited result as an Image.
Live detection overlay to browser stream.
Segmentation overlay to video file.
Tracked detections rendered to browser stream.
confidence_threshold gates bounding boxes (plain, with an id, with a label, or of a track) and segmentations. Bare Mask inputs, rectangles, points, polygons and vectors carry no confidence and are always drawn; landmarks have their own landmark_confidence_threshold.class_names set, a plain BoundingBox is labelled with its class name and integer confidence percentage separated by a vertical bar; without it boxes are unlabelled. A nonempty standalone segmentation mask gets the same label, using 'class N' for an id class_names does not cover. No percent sign is added. Boxes that come with an id, a track or a string are labelled with that instead.Track input draws a trail through the last 32 box centres of each track id, kept in process-wide memory per input. An id absent from a frame loses its trail; a restart clears every trail. The trail grows and draws even while the track's box is below confidence_threshold.Mask or Segmentation mask must have shape [height, width] or [height, width, 1], positive dimensions that fit an int, and data length matching the shape; otherwise the frame fails with an error. A Segmentation mask must also match the frame's dimensions: unlike a bare Mask it is not scaled. Segmentation masks are checked even when their confidence is below confidence_threshold.in_0 passes through unchanged; no overlays are drawn or checked, and track trails are left as they were.input_colors is a per-non-image-input colour override list indexed from 0; a missing entry falls back to a palette default.Rectangle of zero width or height is drawn as its line or dot.BoundingBox whose rectangle rounds to zero pixels wide or high is not drawn, and its label is left out with it: OpenCV skips an empty box. In a [(Segmentation, BoundingBox)] pair the mask is still drawn; the pair is shown or hidden by the Segmentation's confidence, and labelled with its class.Mask (a boolean Tensor of shape [height, width] or [height, width, 1]) and [Mask] render as solid colored fills with no class label. A single Mask uses one palette colour (or its input_colors override); a [Mask] list colours each mask by its list index so instance i keeps a stable colour. Masks emitted at model resolution are scaled nearest-neighbor to the frame before blending.
live-test prerelease
Automated release