Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/detection/annotators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(...)`.
Comment thread
Borda marked this conversation as resolved.

<div class="result" markdown>

![mask-annotator-example](https://media.roboflow.com/supervision-annotator-examples/mask-annotator-example-purple.png){ align=center width="800" }
Expand Down
Loading