RasterTransformer#

class RasterTransformer[source]#

Bases: ABC

Transforms raw chips to be input to a neural network.

__init__()#

Methods

__init__()

transform(chip[, channel_order])

Transform a chip of a raster source.

abstract transform(chip: np.ndarray, channel_order=None) np.ndarray[source]#

Transform a chip of a raster source.

Parameters
  • chip (np.ndarray) – ndarray of shape [height, width, channels] This is assumed to already have the channel_order applied to it if channel_order is set. In other words, channels should be equal to len(channel_order).

  • channel_order – list of indices of channels that were extracted from the raw imagery.

Returns

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

Return type

(np.ndarray)