From e2f1d5812ea1ce209dded7564b51f11b6053b1f1 Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Fri, 5 Apr 2024 12:10:10 +0200 Subject: [PATCH] docs improvements --- docs/how_to/detect_and_annotate.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/how_to/detect_and_annotate.md b/docs/how_to/detect_and_annotate.md index 0bec93ef..221d9ca1 100644 --- a/docs/how_to/detect_and_annotate.md +++ b/docs/how_to/detect_and_annotate.md @@ -339,7 +339,7 @@ that will allow you to draw masks instead of boxes. detections = sv.Detections.from_inference(results) mask_annotator = sv.MaskAnnotator() - label_annotator = sv.LabelAnnotator(text_position=sv.Position.CENTER) + label_annotator = sv.LabelAnnotator(text_position=sv.Position.CENTER_OF_MASS) annotated_image = mask_annotator.annotate( scene=image, detections=detections) @@ -360,7 +360,7 @@ that will allow you to draw masks instead of boxes. detections = sv.Detections.from_ultralytics(results) mask_annotator = sv.MaskAnnotator() - label_annotator = sv.LabelAnnotator(text_position=sv.Position.CENTER) + label_annotator = sv.LabelAnnotator(text_position=sv.Position.CENTER_OF_MASS) annotated_image = mask_annotator.annotate( scene=image, detections=detections) @@ -394,7 +394,7 @@ that will allow you to draw masks instead of boxes. id2label=model.config.id2label) mask_annotator = sv.MaskAnnotator() - label_annotator = sv.LabelAnnotator(text_position=sv.Position.CENTER) + label_annotator = sv.LabelAnnotator(text_position=sv.Position.CENTER_OF_MASS) labels = [ f"{class_name} {confidence:.2f}"