Sam2
            Sam2EmbeddingResponse
¶
    
              Bases: BaseModel
SAM embedding response.
Attributes:
| Name | Type | Description | 
|---|---|---|
embeddings | 
            
                  Union[List[List[List[List[float]]]], Any]
             | 
            
               The SAM embedding.  | 
          
time | 
            
                  float
             | 
            
               The time in seconds it took to produce the embeddings including preprocessing.  | 
          
Source code in inference/core/entities/responses/sam2.py
                6 7 8 9 10 11 12 13 14 15 16 17  |  | 
            Sam2SegmentationPrediction
¶
    
              Bases: BaseModel
SAM segmentation prediction.
Attributes:
| Name | Type | Description | 
|---|---|---|
masks | 
            
                  Union[List[List[List[int]]], Dict[str, Any], Any]
             | 
            
               Mask data - either polygon coordinates or RLE encoding.  | 
          
confidence | 
            
                  float
             | 
            
               Masks confidences.  | 
          
format | 
            
                  Optional[str]
             | 
            
               Format of the mask data: 'polygon' or 'rle'.  | 
          
Source code in inference/core/entities/responses/sam2.py
                20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  |  |