TypeError: MaskAnnotator.__init__() got an unexpected keyword argument 'color_map' #515
-
Search before asking
BugHello, thank you for the grate repo. I'm following the tutorial: https://blog.roboflow.com/how-to-use-segment-anything-model-sam/. The problem is when I want to draw masks on an image using provided detections with Segment-Anything (SAM). The error is: TypeError: MaskAnnotator.init() got an unexpected keyword argument 'color_map' EnvironmentNo response Minimal Reproducible Examplemask_annotator = sv.MaskAnnotator(color_map = "index") detections = sv.Detections.from_sam(sam_result) annotated_image = mask_annotator.annotate(scene=image_bgr.copy(), detections=detections) sv.plot_images_grid( AdditionalNo response Are you willing to submit a PR?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello, I moved issue to Q&A because it is not a bug and color_map become color_lookup and example use case mask_annotator = sv.MaskAnnotator(color_lookup = sv.ColorLookup.INDEX) # INDEX # CLASS #TRACK Enum is here : https://github.com/roboflow/supervision/blob/develop/supervision/annotators/utils.py#L11 |
Beta Was this translation helpful? Give feedback.
Hello, I moved issue to Q&A because it is not a bug and color_map become color_lookup and example use case
Enum is here : https://github.com/roboflow/supervision/blob/develop/supervision/annotators/utils.py#L11