otx.api.entities.inference_parameters#

This module implements the AnalyseParameters entity.

Functions

default_progress_callback(progress[, score])

This is the default progress callback for OptimizationParameters.

Classes

InferenceParameters(is_evaluation, ...)

Inference parameters.

class otx.api.entities.inference_parameters.InferenceParameters(is_evaluation: bool = False, update_progress: ~typing.Callable[[int, float | None], ~typing.Any] = <function default_progress_callback>, explainer: str = '', process_saliency_maps: bool = False, explain_predicted_classes: bool = True, enable_async_inference: bool = True)[source]#

Bases: object

Inference parameters.

is_evaluation#

Set to True if the output dataset is intended to be used for evaluation purposes. In this scenario, any postprocessing filtering (such as thresholding and NMS) should be disabled to avoid interfering with algorithms such as NMS.

Type:

bool

update_progress#

Callback which can be used to provide updates about the progress of a task.

Type:

Callable[[int, float | None], Any]

explainer#

Explain algorithm to be used in explanation mode. Will be converted automatically to lowercase.

Type:

str

process_saliency_maps#

Process saliency map to input image resolution and apply colormap

Type:

bool

explain_predicted_classes#

If set to True, provide explanations only for predicted classes. Otherwise, explain all classes.

Type:

bool

enable_async_inference#

Enables async inference to increase performance.

Type:

bool

update_progress(score: float | None = None)#

This is the default progress callback for OptimizationParameters.

otx.api.entities.inference_parameters.default_progress_callback(progress: int, score: float | None = None)[source]#

This is the default progress callback for OptimizationParameters.