sam
SamEmbeddingRequest
¶
Bases: SamInferenceRequest
SAM embedding request.
Attributes:
Name | Type | Description |
---|---|---|
image |
Optional[InferenceRequestImage]
|
The image to be embedded. |
image_id |
Optional[str]
|
The ID of the image to be embedded used to cache the embedding. |
format |
Optional[str]
|
The format of the response. Must be one of json or binary. |
Source code in inference/core/entities/requests/sam.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
SamInferenceRequest
¶
Bases: BaseRequest
SAM inference request.
Attributes:
Name | Type | Description |
---|---|---|
api_key |
Optional[str]
|
Roboflow API Key. |
sam_version_id |
Optional[str]
|
The version ID of SAM to be used for this request. |
Source code in inference/core/entities/requests/sam.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
SamSegmentationRequest
¶
Bases: SamInferenceRequest
SAM segmentation request.
Attributes:
Name | Type | Description |
---|---|---|
embeddings |
Optional[Union[List[List[List[List[float]]]], Any]]
|
The embeddings to be decoded. |
embeddings_format |
Optional[str]
|
The format of the embeddings. |
format |
Optional[str]
|
The format of the response. |
image |
Optional[InferenceRequestImage]
|
The image to be segmented. |
image_id |
Optional[str]
|
The ID of the image to be segmented used to retrieve cached embeddings. |
has_mask_input |
Optional[bool]
|
Whether or not the request includes a mask input. |
mask_input |
Optional[Union[List[List[List[float]]], Any]]
|
The set of output masks. |
mask_input_format |
Optional[str]
|
The format of the mask input. |
orig_im_size |
Optional[List[int]]
|
The original size of the image used to generate the embeddings. |
point_coords |
Optional[List[List[float]]]
|
The coordinates of the interactive points used during decoding. |
point_labels |
Optional[List[float]]
|
The labels of the interactive points used during decoding. |
use_mask_input_cache |
Optional[bool]
|
Whether or not to use the mask input cache. |
Source code in inference/core/entities/requests/sam.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|