Sam2
Sam2EmbeddingRequest
¶
Bases: Sam2InferenceRequest
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/sam2.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
Sam2InferenceRequest
¶
Bases: BaseRequest
SAM2 inference request.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
Optional[str]
|
Roboflow API Key. |
sam2_version_id |
Optional[str]
|
The version ID of SAM2 to be used for this request. |
Source code in inference/core/entities/requests/sam2.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 | |
Sam2SegmentationRequest
¶
Bases: Sam2InferenceRequest
SAM segmentation request.
Attributes:
| Name | Type | Description |
|---|---|---|
format |
Optional[str]
|
The format of the response. |
image |
InferenceRequestImage
|
The image to be segmented. |
image_id |
Optional[str]
|
The ID of the image to be segmented used to retrieve cached 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. |
Source code in inference/core/entities/requests/sam2.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |