diff --git a/docs/detection/annotators.md b/docs/detection/annotators.md index 651a62232..60ba3dedf 100644 --- a/docs/detection/annotators.md +++ b/docs/detection/annotators.md @@ -194,6 +194,16 @@ Annotators accept detections and apply box or mask visualizations to the detecti ) ``` + !!! note + + `MaskAnnotator` expects `detections.mask` to contain instance segmentation + masks aligned to the image passed to `annotate`. For dense masks, provide a + boolean array of shape `(N, H, W)` where `(H, W)` matches the image height + and width (it also accepts `sv.CompactMask`). If your model returns + framework-specific results, convert them to `sv.Detections` first, for + example with `sv.Detections.from_ultralytics(...)` or + `sv.Detections.from_inference(...)`. +