Skip to content

Commit

Permalink
Merge pull request #646 from roboflow/rename-boxmask-annotator
Browse files Browse the repository at this point in the history
Rename `BoxMaskAnnotator` to `ColorAnnotator`
  • Loading branch information
SkalskiP authored Dec 5, 2023
2 parents 2e7ecdd + 4774ace commit 679fee9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions docs/annotators.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@

</div>

=== "BoxMask"
=== "Color"

```python
>>> import supervision as sv

>>> image = ...
>>> detections = sv.Detections(...)

>>> box_mask_annotator = sv.BoxMaskAnnotator()
>>> annotated_frame = box_mask_annotator.annotate(
>>> color_annotator = sv.ColorAnnotator()
>>> annotated_frame = color_annotator.annotate(
... scene=image.copy(),
... detections=detections
... )
Expand Down Expand Up @@ -318,9 +318,9 @@

:::supervision.annotators.core.BoxCornerAnnotator

## BoxMaskAnnotator
## ColorAnnotator

:::supervision.annotators.core.BoxMaskAnnotator
:::supervision.annotators.core.ColorAnnotator

## CircleAnnotator

Expand Down
2 changes: 1 addition & 1 deletion supervision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
BlurAnnotator,
BoundingBoxAnnotator,
BoxCornerAnnotator,
BoxMaskAnnotator,
CircleAnnotator,
ColorAnnotator,
DotAnnotator,
EllipseAnnotator,
HaloAnnotator,
Expand Down
6 changes: 3 additions & 3 deletions supervision/annotators/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def annotate(
return scene


class BoxMaskAnnotator(BaseAnnotator):
class ColorAnnotator(BaseAnnotator):
"""
A class for drawing box masks on an image using provided detections.
"""
Expand Down Expand Up @@ -308,8 +308,8 @@ def annotate(
>>> image = ...
>>> detections = sv.Detections(...)
>>> box_mask_annotator = sv.BoxMaskAnnotator()
>>> annotated_frame = box_mask_annotator.annotate(
>>> color_annotator = sv.ColorAnnotator()
>>> annotated_frame = color_annotator.annotate(
... scene=image.copy(),
... detections=detections
... )
Expand Down

0 comments on commit 679fee9

Please sign in to comment.