otx.algorithms.segmentation.adapters.openvino#
OTX Adapters - openvino.
Classes
|
Task implementation for Segmentation using OpenVINO backend. |
|
Inferencer implementation for Segmentation using OpenVINO backend. |
- class otx.algorithms.segmentation.adapters.openvino.OpenVINOSegmentationInferencer(hparams: SegmentationConfig, label_schema: LabelSchemaEntity, model_file: str | bytes, weight_file: str | bytes | None = None, device: str = 'CPU', num_requests: int = 1)[source]#
Bases:
IInferencer
Inferencer implementation for Segmentation using OpenVINO backend.
Inferencer implementation for Segmentation using OpenVINO backend.
- Parameters:
hparams – Hyper parameters that the model should use.
label_schema – LabelSchemaEntity that was used during model training.
model_file – Path to model to load, .xml, .bin or .onnx file.
device – Device to run inference on, such as CPU, GPU or MYRIAD. Defaults to “CPU”.
num_requests – Maximum number of requests that the inferencer can make. Good value is the number of available cores. Defaults to 1.
- enqueue_prediction(image: ndarray, id: int, result_handler: Any) None [source]#
Runs async inference.
- predict(image: ndarray) Tuple[ImageResultWithSoftPrediction, AnnotationSceneEntity] [source]#
Perform a prediction for a given input image.
- class otx.algorithms.segmentation.adapters.openvino.OpenVINOSegmentationTask(task_environment: TaskEnvironment)[source]#
Bases:
IDeploymentTask
,IInferenceTask
,IEvaluationTask
,IOptimizationTask
Task implementation for Segmentation using OpenVINO backend.
- deploy(output_model: ModelEntity) None [source]#
Deploy function of OpenVINOSegmentationTask.
- evaluate(output_resultset: ResultSetEntity, evaluation_metric: str | None = None)[source]#
Evaluate function of OpenVINOSegmentationTask.
- infer(dataset: DatasetEntity, inference_parameters: InferenceParameters | None = None) DatasetEntity [source]#
Infer function of OpenVINOSegmentationTask.
- load_inferencer() OpenVINOSegmentationInferencer [source]#
load_inferencer function of OpenVINO Segmentation Task.
- optimize(optimization_type: OptimizationType, dataset: DatasetEntity, output_model: ModelEntity, optimization_parameters: OptimizationParameters | None = None)[source]#
Optimize function of OpenVINOSegmentationTask.
- property hparams#
Hparams of OpenVINO Segmentation Task.