Tasks#

Task Initialization of OTX Detection.

class otx.algorithms.detection.tasks.DetectionInferenceTask(task_environment: TaskEnvironment, **kwargs)#

Inference Task Implementation of OTX Detection.

evaluate(output_resultset: ResultSetEntity, evaluation_metric: Optional[str] = None)#

Evaluate function of OTX Detection Task.

explain(dataset: DatasetEntity, explain_parameters: Optional[InferenceParameters] = None) DatasetEntity#

Main explain function of OTX Detection.

export(export_type: ExportType, output_model: ModelEntity, precision: ModelPrecision = ModelPrecision.FP32, dump_features: bool = False)#

Export function of OTX Detection Task.

infer(dataset: DatasetEntity, inference_parameters: Optional[InferenceParameters] = None) DatasetEntity#

Main infer function of OTX Detection.

unload()#

Unload the task.

class otx.algorithms.detection.tasks.DetectionNNCFTask(task_environment: TaskEnvironment, **kwargs)#

DetectionNNCFTask.

class otx.algorithms.detection.tasks.DetectionTrainTask(task_environment: TaskEnvironment, **kwargs)#

Train Task Implementation of OTX Detection.

cancel_training()#

Cancel training function in DetectionTrainTask.

Sends a cancel training signal to gracefully stop the optimizer. The signal consists of creating a ‘.stop_training’ file in the current work_dir. The runner checks for this file periodically. The stopping mechanism allows stopping after each iteration, but validation will still be carried out. Stopping will therefore take some time.

save_model(output_model: ModelEntity)#

Save best model weights in DetectionTrainTask.

train(dataset: DatasetEntity, output_model: ModelEntity, train_parameters: Optional[TrainParameters] = None)#

Train function in DetectionTrainTask.

class otx.algorithms.detection.tasks.OpenVINODetectionTask(task_environment: TaskEnvironment)#

Task implementation for OTXDetection using OpenVINO backend.

deploy(output_model: ModelEntity) None#

Deploy function of OpenVINODetectionTask.

evaluate(output_resultset: ResultSetEntity, evaluation_metric: Optional[str] = None)#

Evaluate function of OpenVINODetectionTask.

explain(dataset: DatasetEntity, explain_parameters: Optional[InferenceParameters] = None) DatasetEntity#

Explain function of OpenVINODetectionTask.

property hparams#

Hparams of OpenVINO Detection Task.

infer(dataset: DatasetEntity, inference_parameters: Optional[InferenceParameters] = None) DatasetEntity#

Infer function of OpenVINODetectionTask.

load_config() Dict#

Load configurable parameters from model adapter.

Returns:

Dict: config dictionary

load_inferencer() Union[OpenVINODetectionInferencer, OpenVINOMaskInferencer]#

load_inferencer function of OpenVINO Detection Task.

optimize(optimization_type: OptimizationType, dataset: DatasetEntity, output_model: ModelEntity, optimization_parameters: Optional[OptimizationParameters] = None)#

Optimize function of OpenVINODetectionTask.