avalanche.benchmarks.datasets.EndlessCLSimDataset

class avalanche.benchmarks.datasets.EndlessCLSimDataset(root: Optional[Union[str, pathlib.Path]] = None, *, scenario=None, patch_size=64, transform=None, target_transform=None, download=True, semseg=False, labelmap_path=None)[source]

Endless Continual Leanring Simulator Dataset

__init__(root: Optional[Union[str, pathlib.Path]] = None, *, scenario=None, patch_size=64, transform=None, target_transform=None, download=True, semseg=False, labelmap_path=None)[source]

Creates an instance of the Endless-Continual-Leanring-Simulator Dataset.

This dataset is able to download and prepare datasets derived from the Endless-Continual-Learning Simulator, including settings of incremental classes, decrasing illumination, and shifting weather conditions, as described in the paper A Procedural World Generation Framework for Systematic Evaluation of Continual Learning. Also custom datasets are supported when following the same structure. Such can be obtained from the Endless-CL-Simulator standalone application.

Please note: 1) The EndlessCLSimDataset does not provide examples directly, but SubsequenceDatasets (ClassificationSubSequence, VideoSubSequence). Each SubSequenceDataset will contain the samples for one respective sub sequence.

2) For video sequences currently only one sequence per dataset is supported!

Parameters
  • root – root for the datasets data. Defaults to None, which means that the default location for ‘endless-cl-sim’ will be used.

  • scenario – identifier for the dataset to be used. Predefined options are ‘Classes’, for incremental classes scenario, ‘Illumination’, for the decreasing lighting scenario, and ‘Weather’, for the scenario of shifting weather conditions. To load a custom (non-predefined/downloadable) dataset, the identifier needs to be set to None. Defaults to None.

  • patch_size – optional size of image data to be loaded. For classification the patch_size is of type int, because we only consider quadratic input sizes. If the semseg flag is set, the patch_size type is tuple, with (width, height).

  • transform – optional transformations to be applied to the image data.

  • target_transform – optional transformations to be applied to the targets.

  • download – boolean to automatically download data. Defaults to True.

  • semseg – boolean to indicate the use of targets for a semantic segmentation task. Defaults to False.

  • labelmap_path – path (str) to a labelmap.json file, that provides a dictionary mapping ‘class-names’(str) to class-labels(int). The ‘class-names’ are derived from the sub-directory names for each subsequence.

Methods

__init__([root, scenario, patch_size, ...])

Creates an instance of the Endless-Continual-Leanring-Simulator Dataset.

Attributes