RasterTransformer#

class RasterTransformer[source]#

Bases: ABC

Transforms raw chips to be input to a neural network.

__init__()#

Methods

__init__()

get_out_channels(in_channels)

Number of channels in output of transform().

get_out_dtype(in_dtype)

dtype of the output of transform().

transform(chip)

Transform a chip of a raster source.

get_out_channels(in_channels: int) int[source]#

Number of channels in output of transform().

Parameters:

in_channels (int) –

Return type:

int

get_out_dtype(in_dtype: dtype) dtype[source]#

dtype of the output of transform().

Parameters:

in_dtype (dtype) –

Return type:

dtype

abstract transform(chip: ndarray) ndarray[source]#

Transform a chip of a raster source.

Parameters:

chip (ndarray) – Array of shape (…, H, W, C).

Returns:

Array of shape (…, H, W, C)

Return type:

ndarray