otx.tools.converter#
Converter for v1 config.
Classes
Convert Geti model manifest to OTXv2 recipe dictionary. |
|
|
Enum for model status. |
- class otx.tools.converter.GetiConfigConverter[source]#
Bases:
object
Convert Geti model manifest to OTXv2 recipe dictionary.
Example
The following examples show how to use the Converter class. We expect a config file with ModelTemplate information in json form.
Convert template.json to dictionary:
converter = GetiConfigConverter() config = converter.convert("train_config.yaml")
Instantiate an object from the configuration dictionary:
engine, train_kwargs = converter.instantiate( config=config, work_dir="otx-workspace", data_root="tests/assets/car_tree_bug", )
Train the model:
engine.train(**train_kwargs)
- static convert(config: dict) dict [source]#
Convert a geti configuration file to a default configuration dictionary.
- Parameters:
config (dict) – The path to the Geti yaml configuration file.
task (OTXTaskType | None) – Value to override the task.
- Returns:
The default configuration dictionary.
- Return type: