torch_em.util

Helper functionality for loading checkpoints and image data, network prediction, model export and more.

 1"""Helper functionality for loading checkpoints and image data, network prediction, model export and more.
 2"""
 3from .image import load_data, load_image, supports_memmap
 4from .reporting import get_training_summary
 5from .training import parser_helper
 6from .util import (
 7    auto_compile, ensure_array, ensure_spatial_array, ensure_tensor, ensure_tensor_with_channels,
 8    get_constructor_arguments, get_trainer, is_compiled, load_model, model_is_equal, ensure_patch_shape,
 9    validate_roi
10)
11
12# NOTE: we don't import the modelzoo convenience functions here.
13# In order to avoid importing bioimageio.core (which is quite massive) when importing torch_em
14# and to enable running torch_em without bioimageio.core
15# from .modelzoo import (add_weight_formats,
16#                        convert_to_onnx,
17#                        convert_to_torchscript,
18#                        export_bioimageio_model,
19#                        export_parser_helper,
20#                        get_default_citations,
21#                        import_bioimageio_model)