otx.algorithms.visual_prompting.adapters.pytorch_lightning.callbacks.inference#

Inference Callbacks for OTX inference.

Classes

InferenceCallback(otx_dataset)

Callback that updates otx_dataset during inference.

ZeroShotInferenceCallback(otx_dataset, ...)

Callback that updates otx_dataset during zero-shot inference.

class otx.algorithms.visual_prompting.adapters.pytorch_lightning.callbacks.inference.InferenceCallback(otx_dataset: DatasetEntity)[source]#

Bases: Callback

Callback that updates otx_dataset during inference.

Parameters:

otx_dataset (DatasetEntity) – Dataset that predictions will be updated.

on_predict_epoch_end(_trainer: Trainer, _pl_module: LightningModule, outputs: List[Any]) None[source]#

Call when the predict epoch ends.

class otx.algorithms.visual_prompting.adapters.pytorch_lightning.callbacks.inference.ZeroShotInferenceCallback(otx_dataset: DatasetEntity, label_schema: LabelSchemaEntity)[source]#

Bases: Callback

Callback that updates otx_dataset during zero-shot inference.

Parameters:
on_predict_epoch_end(_trainer: Trainer, _pl_module: LightningModule, outputs: List[Any]) None[source]#

Call when the predict epoch ends.