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, hub])Instanciate algorithm from its unique name.
Get the list of available algorithms from Ikomia HUB.
install_algorithm
(name[, force])Launch algorithm installation from Ikomia HUB given its unique name.
update_algorithm
(name)Launch update of the given algorithm.
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, hub: bool = True)#
Instanciate algorithm from its unique name. See
get_algorithms()
orget_online_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 Ikomia HUB and add it to the registry if installation success. Finally the object instance is returned.- Parameters:
name (str) – unique algorithm name
parameters (CWorkflowTaskParam) – initial parameters values
hub (bool) – if False, we don’t try to install algorithm from Ikomia Hub
- 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:
- get_online_algorithms()#
Get the list of available algorithms from Ikomia HUB. Each algorithm is identified by a unique name. Each algorithm can then be instanciated from this name with the function
create_algorithm()
.- 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, force: bool = False)#
Launch algorithm installation from Ikomia HUB given its unique name.
- Parameters:
name (str) – algorithm unique name
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)#
Launch update of the given algorithm. It only concerns algorithms of Ikomia HUB. The function checks version compatibility.
- Parameters:
name (str) – algorithm unique name
- update_algorithms()#
Launch automatic update of all algorithms in the registry. It only concerns algorithms of Ikomia HUB. The function checks version compatibility.