Skip to content

Model IO Utils

Source

Utility functions to load pretrained models.

load_pretrained(path)

Load a pretrained model from a checkpoint or a BioImage Model Zoo model.

Expected formats are .ckpt or .zip files.

Parameters:

  • path (Path | str) –

    Path to the pretrained model.

Returns:

  • tuple[Configuration, CAREamicsModule]

    tuple of CAREamics model and its configuration.

Raises:

  • ValueError

    If the model format is not supported.