Skip to content

What do automatic_masks dictionary values mean in the sam_exploration notebook? #149

Closed Answered by rafaspadilha
RMNT asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @RMNT. The automatic_masks is returned by SamAutomaticMaskGenerator.generate() method provided by the Segment Anything package. Here is the documentation for that method, detailing the returned dictionary:

Returns:
           list(dict(str, any)): A list over records for masks. Each record is
             a dict containing the following keys:
               segmentation (dict(str, any) or np.ndarray): The mask. If
                 output_mode='binary_mask', is an array of shape HW. Otherwise,
                 is a dictionary containing the RLE.
               bbox (list(float)): The box around the mask, in XYWH format.
               area (int): The area in pixels of the mask.
       …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rafaspadilha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants