logai.algorithms package

Subpackages

Submodules

logai.algorithms.algo_interfaces module

logai.algorithms.factory module

class logai.algorithms.factory.AlgorithmFactory

Bases: object

The singleton factory class for all the supported algorithms.

get_algorithm(task, name, config)

Gets a algorithm instance given an algorithm name and a config instance.

Parameters:
  • task – The task name.

  • name – The algorithm name.

  • config – The config instance.

get_algorithm_class(task, name)

Gets the corresponding algorithm class given an algorithm name.

Parameters:
  • task – The task name.

  • name – The algorithm name.

get_config(task, name, config_dict)

Gets a configuration instance given an algorithm name and a config dict.

Parameters:
  • task – The task name.

  • name – The algorithm name.

  • config_dict – The config dictionary.

get_config_class(task, name)

Gets the corresponding configuration class given an algorithm name.

Parameters:
  • task – The task name.

  • name – The algorithm name.

instance = <logai.algorithms.factory.AlgorithmFactory object>
classmethod register(task, name, config_class)

Registers the algorithm name and the configuration class for an algorithm class.

Parameters:
  • task – The task name, e.g., detection, clustering

  • name – The algorithm name(s).

  • config_class – The configuration class.

classmethod unregister(task, name)

Unregisters a registered algorithm.

Parameters:
  • task – The task name.

  • name – The algorithm name.

Module contents