MDAS#

class torchgeo.datasets.MDAS(root='data', subareas=['sub_area_1'], modalities=['3K_RGB', 'HySpex', 'Sentinel_2'], transforms=None, download=False, checksum=False)[source]#

Bases: NonGeoDataset

MDAS dataset.

The MDAS multimodal dataset is a comprehensive dataset for the city of Augsburg, Germany, collected on 7th May 2018. It includes SAR, multispectral, hyperspectral, DSM, and GIS data, providing comprehensive options for data fusion research. MDAS supports applications like resolution enhancement, spectral unmixing, and land cover classification.

Dataset features:

  • 3K DSM data

  • 3K high resolution RGB images

  • Original very high resolution HySpex airborne imagery

  • EeteS simulated imagery with 10m GSD and EnMAP spectral bands

  • EeteS simulated imagery with 30m GSD and EnMAP spectral bands

  • EeteS simulated imagery with 10m GSD and Sentinel-2 spectral bands

  • Sentinel-2 L2A product

  • Sentinel-1 GRD product

  • Open Street Map (OSM) labels, see this table for a table of the label distribution

Dataset format:

  • 3K_RGB.tif (Shape: (4, 15000, 18000)px, Data Type: uint8)

  • 3K_dsm.tif (Shape: (1, 10000, 12000)px, Data Type: float32)

  • HySpex.tif (Shape: (368, 1364, 1636)px, Data Type: int16)

  • EeteS_EnMAP_2dot2m.tif (Shape: (242, 1364, 1636)px, Data Type: float32)

  • EeteS_EnMAP_10m.tif (Shape: (242, 300, 360)px, Data Type: uint16)

  • EeteS_EnMAP_30m.tif (Shape: (242, 100, 120)px, Data Type: uint16)

  • EeteS_Sentinel_2_10m.tif (Shape: (4, 300, 360)px, Data Type: uint16)

  • Sentinel_2.tif (Shape: (12, 300, 360)px, Data Type: uint16)

  • Sentinel_1.tif (Shape: (2, 300, 360)px, Data Type: float32)

  • osm_buildings.tif (Shape: (1, 1364, 1636)px, Data Type: uint8)

  • osm_landuse.tif (Shape: (1, 1364, 1636)px, Data Type: float64)

  • osm_water.tif (Shape: (1, 1364, 1636)px, Data Type: float64)

If you use this dataset in your research, please cite the following paper:

Added in version 0.7.

__init__(root='data', subareas=['sub_area_1'], modalities=['3K_RGB', 'HySpex', 'Sentinel_2'], transforms=None, download=False, checksum=False)[source]#

Initialize a new MDAS dataset instance.

Parameters:
  • root (str | PathLike[str]) – Root directory where the dataset should be stored.

  • subareas (list[str]) – The subareas to load. Options are ‘sub_area_1’, ‘sub_area_2’, ‘sub_area_3’.

  • modalities (list[str]) – The modalities to load. Options are ‘3K_DSM’, ‘3K_RGB’, ‘HySpex’, ‘EeteS_EnMAP_10m’, ‘EeteS_EnMAP_30m’, ‘EeteS_Sentinel_2_10m’, ‘Sentinel-2’, ‘Sentinel-1’, ‘OSM_label’.

  • transforms (Callable[[dict[str, Any]], dict[str, Any]] | None) – A function/transform that takes in a dictionary and returns a transformed version.

  • download (bool) – if True, download dataset and store it in the root directory

  • checksum (bool) – If True, check the integrity of the dataset after download.

Raises:
__len__()[source]#

Return the number of samples in the dataset.

Returns:

the length of the dataset

Return type:

int

__getitem__(index)[source]#

Return the dataset sample at the given index.

Parameters:

index (int) – The index of the sample to return

Returns:

a dictionary containing the data of chosen modalities

Return type:

dict[str, Any]

plot(sample, show_titles=True, suptitle=None)[source]#

Plot a sample from the dataset.

Parameters:
  • sample (dict[str, Any]) – A sample returned by __getitem__.

  • show_titles (bool) – Whether to display titles on the subplots.

  • suptitle (str | None) – An optional super title for the plot.

Returns:

a matplotlib Figure with the rendered sample

Return type:

Figure

__annotate_func__()#

The type of the None singleton.