zea.data.layers

Keras layers for data preprocessing.

Classes

Pad(target_shape[, uniform, axis, ...])

Pad layer for padding tensors to a specified shape which can be used in tf.data pipelines.

Resizer(image_size, resize_type[, ...])

Resize layer for resizing images.

class zea.data.layers.Pad(target_shape, uniform=True, axis=None, fail_on_bigger_shape=True, pad_kwargs=None, **kwargs)[source]

Bases: Pad

Pad layer for padding tensors to a specified shape which can be used in tf.data pipelines.

call(inputs)[source]

Pad the input tensor.

class zea.data.layers.Resizer(image_size, resize_type, resize_axes=None, seed=None, **resize_kwargs)[source]

Bases: TFDataLayer

Resize layer for resizing images. Can deal with N-dimensional images. Can do resize, center_crop, random_crop and crop_or_pad.

Can be used in tf.data pipelines.

call(inputs)[source]

Resize the input tensor.