composer.datasets.build_ade20k_dataloader(batch_size, datadir, *, split='train', drop_last=True, shuffle=True, base_size=512, min_resize_scale=0.5, max_resize_scale=2.0, final_size=512, ignore_background=True, **dataloader_kwargs)[source]#

Builds an ADE20k dataloader.

  • datadir (str) โ€“ path to location of dataset.

  • batch_size (int) โ€“ Batch size per device.

  • split (str) โ€“ the dataset split to use either โ€˜trainโ€™, โ€˜valโ€™, or โ€˜testโ€™. Default: 'train`.

  • drop_last (bool) โ€“ whether to drop last samples. Default: True.

  • shuffle (bool) โ€“ whether to shuffle the dataset. Default: True.

  • base_size (int) โ€“ initial size of the image and target before other augmentations. Default: 512.

  • min_resize_scale (float) โ€“ the minimum value the samples can be rescaled. Default: 0.5.

  • max_resize_scale (float) โ€“ the maximum value the samples can be rescaled. Default: 2.0.

  • final_size (int) โ€“ the final size of the image and target. Default: 512.

  • ignore_background (bool) โ€“ if true, ignore the background class when calculating the training loss. Default: true.

  • **dataloader_kwargs (Dict[str, Any]) โ€“ Additional settings for the dataloader (e.g. num_workers, etc.)