ImageTranslatorCNN - Convolutional Neural Network

class aydin.it.cnn.ImageTranslatorCNN(*args, **kwargs)[source]

Convolutional Neural Network (CNN) based Image Translator<br>

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

Adds the given transform to the self.transforms_list

Parameters
transformImageTransformBase
clear_transforms()

Clears the transforms list

static load(path: str)

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)
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

stop_training()[source]

Stops currently running training within the instance by turning the flag true for early stop callback.

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

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