import supervision as sv mask_annotator = sv.MaskAnnotator(color_map = "index") detections = sv.Detections.from_sam(result) annotated_image = mask_annotator.annotate(image_bgr, detections)