Skip to content

labels or label isn't an existing parameter for box_annotate() #1634

Closed Answered by LinasKo
Jarradmorden asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Jarradmorden 👋

The supervision version there is indeed very old. Here's how you'd use the annotators right now:

mask_annotator = sv.MaskAnnotator()
box_annotator = sv.BoxAnnotator()
label_annotator = sv.LabelAnnotator()

images = []
for image_name, image, annotations in dataset:
    annotated_image = image.copy()
    annotated_image = mask_annotator.annotate(
        scene=annotated_image,
        detections=annotations)
    annotated_image = box_annotator.annotate(
        scene=annotated_image,
        detections=annotations)
    annotated_image = label_annotator.annotate(
        scene=annotated_image,
        detections=annotations,
    )
    images.append(annotated_image)

The Lab…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Jarradmorden
Comment options

You must be logged in to vote
8 replies
@onuralpszr
Comment options

@Jarradmorden
Comment options

@onuralpszr
Comment options

@Jarradmorden
Comment options

@LinasKo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #1633 on October 30, 2024 14:59.