IkomiaRegistry#

class ikomia.dataprocess.registry.IkomiaRegistry(lazy_load: bool = True)#

Registry for all Ikomia algorithms (built-in and Ikomia HUB). It stores all algorithms references and allows to install, update and instanciate any of these algorithms. Derived from CIkomiaRegistry.

Import

from ikomia.dataprocess.registry import IkomiaRegistry

Methods

__init__(arg1)

__init__( (object)self) -> None :

create_algorithm(name[, parameters, ...])

Instanciate algorithm from its unique name.

get_public_hub_algorithms([force])

Get the list of available algorithms from public Ikomia HUB.

get_private_hub_algorithms([force])

Get the list of available algorithms from private Ikomia HUB (authentication required).

install_algorithm(name[, public_hub, ...])

Launch algorithm installation from Ikomia HUB given its unique name.

update_algorithm(name[, public_hub, private_hub])

Launch update of the given algorithm.

update_algorithms([public_hub, private_hub])

Launch automatic update of all algorithms in the registry.

Inherited methods

get_algorithms(self))

Get all available algorithms from the Ikomia registry.

get_algorithm_info(self, name)

Get algorithm informations such as description, authors, documentation link...

get_plugins_directory(self)

Get the current Ikomia plugins directory.

register_task(self, factory)

Add new algorithm factory to Ikomia registry.

set_plugins_directory(self, directory)

Set directory where Ikomia plugins are stored.

Details

__init__((object)arg1) None#
__init__( (object)self) -> None :

Default constructor

create_algorithm(name: str, parameters=None, public_hub: bool = True, private_hub=False)#

Instanciate algorithm from its unique name. See get_algorithms() or get_public_hub_algorithms() or get_private_hub_algorithms() to get valid names. If algorithm is already in the registry, an object instance is directly returned. Otherwise, the function tries to install it from public Ikomia HUB first, and private Ikomia HUB at the end. It finally adds it to the registry if installation succeed and returns the object instance.

Parameters:
  • name (str) – unique algorithm name

  • parameters (CWorkflowTaskParam) – initial parameters values

  • public_hub (bool) – try to install algorithm from public Ikomia Hub if True

  • private_hub (bool) – try to install algorithm from private Ikomia Hub if True

Returns:

algorithm instance

Return type:

CWorkflowTask or derived

get_algorithms((CIkomiaRegistry)self)) object :#

Get all available algorithms from the Ikomia registry. Before using an algorithm, you must instanciate it from its name using create_instance().You can only instanciate algorithms whose name is in the returned list.

Returns:

list of algorithm names

Return type:

string

get_algorithm_info((CIkomiaRegistry)self, (str)name) CTaskInfo :#

Get algorithm informations such as description, authors, documentation link…

Parameters:

name (str) – algorithm name

Returns:

algorithm information

Return type:

CTaskInfo

get_public_hub_algorithms(force: bool = False)#

Get the list of available algorithms from public Ikomia HUB. Each algorithm is identified by a unique name. Each algorithm can then be instanciated from this name with the function create_algorithm().

Parameters:

force (bool) – IkomiaRegistry class use cache for online algorithms. Set this parameter to True to force online list update.

Returns:

list of algorithms information

Return type:

list of dict

get_private_hub_algorithms(force: bool = False)#

Get the list of available algorithms from private Ikomia HUB (authentication required). Each algorithm is identified by a unique name. Each algorithm can then be instanciated from this name with the function create_algorithm().

Parameters:

force (bool) – IkomiaRegistry class use cache for online algorithms. Set this parameter to True to force online list update.

Returns:

list of algorithms information

Return type:

list of dict

get_plugins_directory((CIkomiaRegistry)self) str :#

Get the current Ikomia plugins directory.

Returns:

full path to Ikomia plugins directory

Return type:

str

register_task((CIkomiaRegistry)self, (CTaskFactory)factory) None :#

Add new algorithm factory to Ikomia registry. Once registered, you are able to instanciate algorithm object and use it inside a workflow.

Parameters:

factory (CTaskFactory based object) – task factory

install_algorithm(name: str, public_hub: bool = True, private_hub: bool = False, force: bool = False)#

Launch algorithm installation from Ikomia HUB given its unique name.

Parameters:
  • name (str) – algorithm unique name

  • public_hub (bool) – search algorithm in public Ikomia HUB if True

  • private_hub (bool) – search algorithm in private Ikomia HUB if True

  • force (bool) – force package installation even if the algorithm is already installed

set_plugins_directory((CIkomiaRegistry)self, (str)directory) None :#

Set directory where Ikomia plugins are stored.

Parameters:

directory (str) –

update_algorithm(name: str, public_hub: bool = True, private_hub: bool = False)#

Launch update of the given algorithm. It only concerns algorithms from Ikomia HUB. In case where algorithm name is both available in public and private HUBs, you should set parameters public_hub and private_hub to explicitly set the source. If both are set to True, the function will update local version from public HUB.

Parameters:
  • name (str) – algorithm unique name

  • public_hub (bool) – update public algorithm from Ikomia HUB if True

  • private_hub (bool) – update private algorithm from Ikomia HUB if True

update_algorithms(public_hub: bool = True, private_hub: bool = False)#

Launch automatic update of all algorithms in the registry. It only concerns algorithms of Ikomia HUB. The function checks version compatibility.

Parameters:
  • public_hub (bool) – update public algorithms from Ikomia HUB if True

  • private_hub (bool) – update private algorithms from Ikomia HUB if True