Skip to content

In Memory Tiled Pred Dataset

Source

In-memory tiled prediction dataset.

InMemoryTiledPredDataset

Bases: Dataset

Prediction dataset storing data in memory and returning tiles of each image.

Parameters:

  • prediction_config (InferenceConfig) –

    Prediction configuration.

  • inputs (NDArray) –

    Input data.

__getitem__(index)

Return the patch corresponding to the provided index.

Parameters:

  • index (int) –

    Index of the patch to return.

Returns:

  • tuple of NDArray and TileInformation

    Transformed patch.

__init__(prediction_config, inputs)

Constructor.

Parameters:

  • prediction_config (InferenceConfig) –

    Prediction configuration.

  • inputs (NDArray) –

    Input data.

Raises:

__len__()

Return the length of the dataset.

Returns:

  • int

    Length of the dataset.