campa.data.create_dataset
- create_dataset(params)[source]
Create a
NNDataset.Parameters determine how the data should be selected and processed. The following keys in parameters are expected:
dataset_name: name of the resulting dataset that is defined by these parameters (relative toDATA_DIR/datasets)data_config: name of data configuration (registered incampa.ini)data_dirs: where to read data from (relative toDATA_DIRdefined in data config)channels: list of channel names to include in this datasetcondition: list of conditions. Should be defined in data config. The suffix _one_hot will convert the condition in a one-hot encoded vector. Conditions are concatenated, except when they are defined as a list of lists. In this case the condition is defined as a pairwise combination of the conditions.condition_kwargs: kwargs toMPPData.add_conditions()split_kwargs: kwargs toMPPData.train_val_test_split()test_img_size: standard size of images in test set. Imaged are padded/truncated to this sizesubset: (bool) subset to objects with certain metadata.subset_kwargs: kwargs toMPPData.subset()defining which object to subset tosubsample: (bool) subsampling of pixels (only for train/val)subsample_kwargs: kwargs forMPPData.subsample()defining the fraction of pixels to be sampledneighborhood: (bool) add local neighbourhood to samples in NNDatasetneighborhood_size: size of neighbourhoodnormalise: (bool) Intensity normalisationnormalise_kwargs: kwargs toMPPData.normalise()seed: random seed to make subsampling reproducible