Inference
ClassificationInferenceResponse
¶
Bases: CvInferenceResponse, WithVisualizationResponse
Classification inference response.
Attributes:
| Name | Type | Description |
|---|---|---|
predictions |
List[ClassificationPrediction]
|
List of classification predictions. |
top |
str
|
The top predicted class label. |
confidence |
float
|
The confidence of the top predicted class label. |
Source code in inference/core/entities/responses/inference.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
ClassificationPrediction
¶
Bases: BaseModel
Classification prediction.
Attributes:
| Name | Type | Description |
|---|---|---|
class_name |
str
|
The predicted class label. |
class_id |
int
|
Numeric ID associated with the class label. |
confidence |
float
|
The class label confidence as a fraction between 0 and 1. |
Source code in inference/core/entities/responses/inference.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
CvInferenceResponse
¶
Bases: InferenceResponse
Computer Vision inference response.
Attributes:
| Name | Type | Description |
|---|---|---|
image |
Union[List[InferenceResponseImage], InferenceResponseImage]
|
Image(s) used in inference. |
Source code in inference/core/entities/responses/inference.py
194 195 196 197 198 199 200 201 | |
DepthEstimationResponse
¶
Bases: BaseModel
Response for depth estimation inference.
Attributes:
| Name | Type | Description |
|---|---|---|
normalized_depth |
List[List[float]]
|
The normalized depth map as a 2D array of floats between 0 and 1. |
image |
Optional[str]
|
Base64 encoded visualization of the depth map if visualize_predictions is True. |
time |
float
|
The processing time in seconds. |
visualization |
Optional[str]
|
Base64 encoded visualization of the depth map if visualize_predictions is True. |
Source code in inference/core/entities/responses/inference.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
FaceDetectionPrediction
¶
Bases: ObjectDetectionPrediction
Face Detection prediction.
Attributes:
| Name | Type | Description |
|---|---|---|
class_name |
str
|
fixed value "face". |
landmarks |
Union[List[Point], List[Point3D]]
|
The detected face landmarks. |
Source code in inference/core/entities/responses/inference.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
InferenceResponse
¶
Bases: BaseModel
Base inference response.
Attributes:
| Name | Type | Description |
|---|---|---|
inference_id |
Optional[str]
|
Unique identifier of inference |
frame_id |
Optional[int]
|
The frame id of the image used in inference if the input was a video. |
time |
Optional[float]
|
The time in seconds it took to produce the predictions including image preprocessing. |
Source code in inference/core/entities/responses/inference.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
InferenceResponseImage
¶
Bases: BaseModel
Inference response image information.
Attributes:
| Name | Type | Description |
|---|---|---|
width |
int
|
The original width of the image used in inference. |
height |
int
|
The original height of the image used in inference. |
Source code in inference/core/entities/responses/inference.py
157 158 159 160 161 162 163 164 165 166 167 168 | |
InstanceSegmentationInferenceResponse
¶
Bases: CvInferenceResponse, WithVisualizationResponse
Instance Segmentation inference response.
Attributes:
| Name | Type | Description |
|---|---|---|
predictions |
List[InstanceSegmentationPrediction]
|
List of instance segmentation predictions. |
Source code in inference/core/entities/responses/inference.py
251 252 253 254 255 256 257 258 259 260 | |
MultiLabelClassificationInferenceResponse
¶
Bases: CvInferenceResponse, WithVisualizationResponse
Multi-label Classification inference response.
Attributes:
| Name | Type | Description |
|---|---|---|
predictions |
Dict[str, MultiLabelClassificationPrediction]
|
Dictionary of multi-label classification predictions. |
predicted_classes |
List[str]
|
The list of predicted classes. |
Source code in inference/core/entities/responses/inference.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
MultiLabelClassificationPrediction
¶
Bases: BaseModel
Multi-label Classification prediction.
Attributes:
| Name | Type | Description |
|---|---|---|
confidence |
float
|
The class label confidence as a fraction between 0 and 1. |
Source code in inference/core/entities/responses/inference.py
144 145 146 147 148 149 150 151 152 153 154 | |
ObjectDetectionInferenceResponse
¶
Bases: CvInferenceResponse, WithVisualizationResponse
Object Detection inference response.
Attributes:
| Name | Type | Description |
|---|---|---|
predictions |
List[ObjectDetectionPrediction]
|
List of object detection predictions. |
Source code in inference/core/entities/responses/inference.py
223 224 225 226 227 228 229 230 | |
ObjectDetectionPrediction
¶
Bases: BaseModel
Object Detection prediction.
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
The center x-axis pixel coordinate of the prediction. |
y |
float
|
The center y-axis pixel coordinate of the prediction. |
width |
float
|
The width of the prediction bounding box in number of pixels. |
height |
float
|
The height of the prediction bounding box in number of pixels. |
confidence |
float
|
The detection confidence as a fraction between 0 and 1. |
class_name |
str
|
The predicted class label. |
class_confidence |
Union[float, None]
|
The class label confidence as a fraction between 0 and 1. |
class_id |
int
|
The class id of the prediction |
Source code in inference/core/entities/responses/inference.py
8 9 10 11 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
Point
¶
Bases: BaseModel
Point coordinates.
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
The x-axis pixel coordinate of the point. |
y |
float
|
The y-axis pixel coordinate of the point. |
Source code in inference/core/entities/responses/inference.py
53 54 55 56 57 58 59 60 61 62 | |
Point3D
¶
Bases: Point
3D Point coordinates.
Attributes:
| Name | Type | Description |
|---|---|---|
z |
float
|
The z-axis pixel coordinate of the point. |
Source code in inference/core/entities/responses/inference.py
65 66 67 68 69 70 71 72 | |
SemanticSegmentationInferenceResponse
¶
Bases: CvInferenceResponse, WithVisualizationResponse
Semantic Segmentation inference response.
Attributes:
| Name | Type | Description |
|---|---|---|
predictions |
SemanticSegmentationPrediction
|
Semantic segmentation predictions. |
Source code in inference/core/entities/responses/inference.py
263 264 265 266 267 268 269 270 271 272 | |
WithVisualizationResponse
¶
Bases: BaseModel
Response with visualization.
Attributes:
| Name | Type | Description |
|---|---|---|
visualization |
Optional[Any]
|
Base64 encoded string containing prediction visualization image data. |
Source code in inference/core/entities/responses/inference.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |