supervision
supervision copied to clipboard
Create `sv.PercentageBarAnnotator`
Description
Supervision is expanding its range of annotators. Following the example of BoundingBoxAnnotator, MaskAnnotator, or EllipseAnnotator, create PercentageBarAnnotator
- whose task is to draw percentage bars related to sv.Detections
. The inspiration for this annotator is, of course, video games.
It should also allow you to control the bar's position in relation to the box using sv.Position
. The color of the bar and border should be configurable as well. By default, the bar should visualize sv.Detections.confidence
value. Bar color should change across sv.ColorPalette
provided as color
argument.
Pseudocode
class PercentageBarAnnotator(BaseAnnotator):
def __init__(
self,
color: Union[Color, ColorPalette] = ColorPalette.default(),
border_color: Color = Color.black(),
position: Position = Position.TOP_CENTER
):
pass
def annotate(
self,
scene: np.ndarray,
detections: Detections,
) -> np.ndarray:
pass
Documentation
Upenij that the new annotator is well documented. Read more in our contributor guidelines.
I would like to work on this task.
Sure thing!
@SkalskiP
How does that look like?
Find whole video sample in link below: https://drive.google.com/file/d/14wkO9FVAjxJd8QHVMwknuKhRASwrMPJp/view?usp=drive_link
This task was completed in https://github.com/roboflow/supervision/pull/720. Closing the issue.