Model Description
Module use to build BMZ model description.
create_model_description(config, name, general_description, data_description, authors, inputs, outputs, weights_path, torch_version, careamics_version, config_path, env_path, covers, channel_names=None, model_version='0.1.0')
Create model description.
Parameters:
-
config(Configuration) –CAREamics configuration.
-
name(str) –Name of the model.
-
general_description(str) –General description of the model.
-
data_description(str) –Description of the data the model was trained on.
-
authors(list[Author]) –Authors of the model.
-
inputs(Union[Path, str]) –Path to input .npy file.
-
outputs(Union[Path, str]) –Path to output .npy file.
-
weights_path(Union[Path, str]) –Path to model weights.
-
torch_version(str) –Pytorch version.
-
careamics_version(str) –CAREamics version.
-
config_path(Union[Path, str]) –Path to model configuration.
-
env_path(Union[Path, str]) –Path to environment file.
-
covers(list of pathlib.Path or str) –Paths to cover images.
-
channel_names(Optional[list[str]], default:None) –Channel names, by default None.
-
model_version(str, default:"0.1.0") –Model version.
Returns:
-
ModelDescr–Model description.
extract_model_path(model_desc)
Return the relative path to the weights and configuration files.
Parameters:
-
model_desc(ModelDescr) –Model description.
Returns:
-
tuple of (path, path)–Weights and configuration paths.