composer.datasets.ade20k_hparams#
ADE20K Semantic segmentation and scene parsing dataset.
Please refer to the ADE20K dataset for more details about this dataset.
Hparams
These classes are used with yahp
for YAML
-based configuration.
Defines an instance of the ADE20k dataset for semantic segmentation from a local disk. |
|
DatasetHparams for creating an instance of StreamingADE20k. |
- class composer.datasets.ade20k_hparams.ADE20kDatasetHparams(use_synthetic=False, synthetic_num_unique_samples=100, synthetic_device='cpu', synthetic_memory_format=MemoryFormat.CONTIGUOUS_FORMAT, drop_last=True, shuffle=True, split='train', base_size=512, min_resize_scale=0.5, max_resize_scale=2.0, final_size=512, ignore_background=True, datadir=None)[source]#
Bases:
composer.datasets.dataset_hparams.DatasetHparams
,composer.datasets.synthetic_hparams.SyntheticHparamsMixin
Defines an instance of the ADE20k dataset for semantic segmentation from a local disk.
- Parameters
split (str) โ the dataset split to use either โtrainโ, โvalโ, or โtestโ. Default:
'train`
.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
.datadir (str) โ The path to the data directory.
- class composer.datasets.ade20k_hparams.StreamingADE20kHparams(drop_last=True, shuffle=True, remote='s3://mosaicml-internal-dataset-ade20k/mds/1/', local='/tmp/mds-cache/mds-ade20k/', split='train', base_size=512, min_resize_scale=0.5, max_resize_scale=2.0, final_size=512, ignore_background=True)[source]#
Bases:
composer.datasets.dataset_hparams.DatasetHparams
DatasetHparams for creating an instance of StreamingADE20k.
- Parameters
remote (str) โ Remote directory (S3 or local filesystem) where dataset is stored. Default:
's3://mosaicml-internal-dataset-ade20k/mds/1/`
local (str) โ Local filesystem directory where dataset is cached during operation. Default:
'/tmp/mds-cache/mds-ade20k/`
split (str) โ The dataset split to use, either โtrainโ or โvalโ. Default:
'train`
.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
.