ADVANCE#

class torchgeo.datasets.ADVANCE(root='data', transforms=None, download=False, checksum=False)[source]#

Bases: NonGeoDataset

ADVANCE dataset.

The ADVANCE dataset is a dataset for audio visual scene recognition.

Dataset features:

  • 5,075 pairs of geotagged audio recordings and images

  • three spectral bands - RGB (512x512 px)

  • 10-second audio recordings

Dataset format:

  • images are three-channel jpgs

  • audio files are in wav format

Dataset classes:

  1. airport

  2. beach

  3. bridge

  4. farmland

  5. forest

  6. grassland

  7. harbour

  8. lake

  9. orchard

  10. residential

  11. sparse shrub land

  12. sports land

  13. train station

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

Note

This dataset requires the following additional library to be installed:

  • scipy to load the audio files to tensors

__init__(root='data', transforms=None, download=False, checksum=False)[source]#

Initialize a new ADVANCE dataset instance.

Parameters:
  • root (str | PathLike[str]) – root directory where dataset can be found

  • transforms (Callable[[dict[str, Any]], dict[str, Any]] | None) – a function/transform that takes input sample and its target as entry and returns a transformed version

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

  • checksum (bool) – if True, check the MD5 of the downloaded files (may be slow)

Raises:
__getitem__(index)[source]#

Return an index within the dataset.

Parameters:

index (int) – index to return

Returns:

data and label at that index

Return type:

dict[str, Any]

__len__()[source]#

Return the number of data points in the dataset.

Returns:

length of the dataset

Return type:

int

__annotate_func__()#

The type of the None singleton.

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) – flag indicating whether to show titles above each panel

  • suptitle (str | None) – optional string to use as a suptitle

Returns:

a matplotlib Figure with the rendered sample

Return type:

Figure

Added in version 0.2.