ImageTranslatorBase

class aydin.it.base.ImageTranslatorBase(monitor=None, blind_spots: Optional[Union[str, List[Tuple[int]]]] = None, tile_min_margin: int = 8, tile_max_margin: Optional[int] = None, max_memory_usage_ratio: float = 0.9, max_tiling_overhead: float = 0.1)[source]

Image Translator base class

add_transform(transform: aydin.it.transforms.base.ImageTransformBase, sort: bool = True)[source]

Adds the given transform to the self.transforms_list

Parameters
transformImageTransformBase
clear_transforms()[source]

Clears the transforms list

static load(path: str)[source]

Returns an ‘all-batteries-included’ image translation model at a given path (folder).

Parameters
pathstr

path to load from.

static parse_axes_args(batch_axes: Union[List[int], List[bool]], chan_axes: Union[List[int], List[bool]], ndim: int)[source]
Parameters
batch_axesUnion[List[int], List[bool]]
chan_axesUnion[List[int], List[bool]]
ndimint
save(path: str)[source]

Saves a ‘all-batteries-included’ image translation model at a given path (folder).

Parameters
pathstr

path to save to

train(input_image, target_image=None, batch_axes=None, channel_axes=None, train_valid_ratio=0.1, callback_period=3, jinv=None)[source]

Train to translate a given input image to a given output image. This has a lot of the machinery for batching and more…