otx.algorithms.anomaly.adapters.anomalib.config#

Initialization of Configurable parameter conversion between OTX and Anomalib.

Functions

get_anomalib_config(task_name, otx_config)

Get anomalib configuration.

update_anomalib_config(anomalib_config, ...)

Update anomalib configuration.

otx.algorithms.anomaly.adapters.anomalib.config.get_anomalib_config(task_name: str, otx_config: ConfigurableParameters) DictConfig | ListConfig[source]#

Get anomalib configuration.

Create an anomalib config object that matches the values specified in the OTX config.

Parameters:
  • task_name – Task name to load configuration from the Anomalib

  • otx_config – ConfigurableParameters: OTX config object parsed from configuration.yaml file

Returns:

Anomalib config object for the specified model type with overwritten default values.

otx.algorithms.anomaly.adapters.anomalib.config.update_anomalib_config(anomalib_config: DictConfig | ListConfig, otx_config: ConfigurableParameters)[source]#

Update anomalib configuration.

Overwrite the default parameter values in the anomalib config with the values specified in the OTX config. The function is recursively called for each parameter group present in the OTX config.

Parameters:
  • anomalib_config – DictConfig: Anomalib config object

  • otx_config – ConfigurableParameters: OTX config object parsed from configuration.yaml file