composer.datasets.brats#
composer.datasets.brats
Functions
|
composer.datasets.brats.coin_flip |
Returns the same class as was passed in, with dunder methods added based on the fields defined in the class. |
|
|
composer.datasets.brats.get_data_split |
|
composer.datasets.brats.get_split |
|
composer.datasets.brats.load_data |
|
composer.datasets.brats.random_augmentation |
Classes
|
composer.datasets.brats.Blur |
|
composer.datasets.brats.Brightness |
|
composer.datasets.brats.Contrast |
|
composer.datasets.brats.Crop |
Protocol for custom DataLoaders compatible with |
|
|
composer.datasets.brats.Flips |
|
composer.datasets.brats.Noise |
|
composer.datasets.brats.PytTrain |
|
composer.datasets.brats.PytVal |
|
composer.datasets.brats.Transpose |
Hparams
These classes are used with yahp
for YAML
-based configuration.
Defines an instance of the BraTS dataset for image segmentation. |
|
Hyperparameters to initialize a |
|
Abstract base class for hyperparameters to initialize a dataset. |
Attributes
Dataset
PATCH_SIZE
- class composer.datasets.brats.BratsDatasetHparams(is_train=True, drop_last=True, shuffle=True, datadir=None, oversampling=0.33)[source]#
Bases:
composer.datasets.hparams.DatasetHparams
Defines an instance of the BraTS dataset for image segmentation.
- Parameters
datadir (str) โ The path to the data directory.
is_train (bool) โ Whether to load the training data (the default) or validation data.
drop_last (bool) โ If the number of samples is not divisible by the batch size, whether to drop the last batch (the default) or pad the last batch with zeros.
shuffle (bool) โ Whether to shuffle the dataset. Defaults to True.
oversampling (float) โ The oversampling ratio to use.
- initialize_object(batch_size, dataloader_hparams)[source]#
Creates a
DataLoader
orDataloaderSpec
for this dataset.- Parameters
batch_size (int) โ The size of the batch the dataloader should yield. This batch size is device-specific and already incorporates the world size.
dataloader_hparams (DataloaderHparams) โ The dataset-independent hparams for the dataloader
- Returns
Dataloader or DataSpec โ The dataloader, or if the dataloader yields batches of custom types,
a :class:`DataSpec`.