campa.data.NNDataset

class NNDataset(dataset_name, data_config=None)[source]

Dataset for training and evaluation of neural networks.

A NNDataset is stored within DATA_DIR/dataset_name. This folder contains train/val/test/val_img/test_img folders with MPPData objects.

Parameters
  • dataset_name (str) – name of the dataset, relative to DATA_DIR

  • data_config (Optional[str]) – name of the data config to use, should be registered in campa.ini

Attributes

data

Train, val, and test MPPDatas.

imgs

Val and test MPPDatas containing entire images for visualisation.

Methods

get_tf_dataset([split, output_channels, ...])

tf.data.Dataset of the desired split.

x(split[, is_conditional])

Neural network inputs.

y(split[, output_channels])

Groundtruth outputs.