Files
supervision/docs/keypoint/annotators.md
T
918b6139ef feat(keypoints): add keypoint conversion bridge (#2277)
* feat(keypoints): add RF-DETR keypoint conversion bridge
* feat: add RF-DETR keypoint uncertainty visualization
* refactor(keypoints): remove deprecated RF-DETR keypoint conversion logic
* refactor: improve internal handling of keypoint data and detection utilities
* fix(keypoints): handle non-finite confidence values and empty keypoint arrays
* docs(keypoint): add VertexEllipseAnnotator to annotators docs
* docs(keypoints): add Example block to KeyPoints.from_rfdetr docstring
* docs(keypoints): document source_shape HW ordering in from_rfdetr
* feat(keypoints): validate precision_cholesky shape in from_rfdetr
* refine(keypoints): add warning log for silent precision matrix failures
* fix(keypoints): fix mypy type errors in VertexEllipseAnnotator
* test(keypoints): add confidence_threshold filter test for VertexEllipseAnnotator
* test(keypoints): add max_axis_length cap and constructor validator tests
* docs(keypoints): document max_axis_length=None risk in VertexEllipseAnnotator
* docs(keypoints): add Raises section to VertexEllipseAnnotator.annotate docstring
* docs(keypoints): document confidence scale convention in from_rfdetr
* docs(keypoints): note from_rfdetr input convention in KeyPoints class docstring
* fix(types): improve type hinting for internal and keypoints modules
* fix(keypoints): handle None class_id in from_rfdetr conversion

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-05-28 10:36:41 +02:00

3.0 KiB

comments
comments
true

Annotators

=== "VertexAnnotator"

```python
import supervision as sv

image = ...
key_points = sv.KeyPoints(...)

vertex_annotator = sv.VertexAnnotator(
    color=sv.Color.GREEN,
    radius=10,
)
annotated_frame = vertex_annotator.annotate(
    scene=image.copy(),
    key_points=key_points,
)
```

<div class="result" markdown>

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

</div>

=== "EdgeAnnotator"

```python
import supervision as sv

image = ...
key_points = sv.KeyPoints(...)

edge_annotator = sv.EdgeAnnotator(
    color=sv.Color.GREEN,
    thickness=5,
)
annotated_frame = edge_annotator.annotate(
    scene=image.copy(),
    key_points=key_points,
)
```

<div class="result" markdown>

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

</div>

=== "VertexLabelAnnotator"

```python
import supervision as sv

image = ...
key_points = sv.KeyPoints(...)

vertex_label_annotator = sv.VertexLabelAnnotator(
    color=sv.Color.GREEN,
    text_color=sv.Color.BLACK,
    border_radius=5,
)
annotated_frame = vertex_label_annotator.annotate(
    scene=image.copy(),
    key_points=key_points,
)
```

<div class="result" markdown>

![vertex-label-annotator-example](https://media.roboflow.com/supervision-annotator-examples/vertex-label-annotator-example.png){ align=center width="800" }

</div>

=== "VertexEllipseAnnotator"

```python
import numpy as np
import supervision as sv

image = ...
key_points = sv.KeyPoints(...)

# covariance shape: (N, K, 2, 2) — pixel-space covariance per keypoint
covariance = np.zeros((len(key_points), key_points.xy.shape[1], 2, 2), dtype=np.float32)
key_points.data["covariance"] = covariance

ellipse_annotator = sv.VertexEllipseAnnotator(
    color=sv.Color.GREEN,
    thickness=2,
    sigma=2.0,
)
annotated_frame = ellipse_annotator.annotate(
    scene=image.copy(),
    key_points=key_points,
)
```

:::supervision.key_points.annotators.VertexAnnotator

:::supervision.key_points.annotators.EdgeAnnotator

:::supervision.key_points.annotators.VertexLabelAnnotator

:::supervision.key_points.annotators.VertexEllipseAnnotator