MapInWild#
- class torchgeo.datasets.MapInWild(root='data', modality=['mask', 'esa_wc', 'viirs', 's2_summer'], split='train', transforms=None, download=False, checksum=False)[source]#
Bases:
NonGeoDatasetMapInWild dataset.
The MapInWild dataset is curated for the task of wilderness mapping on a pixel-level. MapInWild is a multi-modal dataset and comprises various geodata acquired and formed from different RS sensors over 1018 locations: dual-pol Sentinel-1, four-season Sentinel-2 with 10 bands, ESA WorldCover map, and Visible Infrared Imaging Radiometer Suite NightTime Day/Night band. The dataset consists of 8144 images with the shape of 1920 x 1920 pixels. The images are weakly annotated from the World Database of Protected Areas (WDPA).
Dataset features:
1018 areas globally sampled from the WDPA
10-Band Sentinel-2
Dual-pol Sentinel-1
ESA WorldCover Land Cover
Visible Infrared Imaging Radiometer Suite NightTime Day/Night Band
If you use this dataset in your research, please cite the following paper:
Added in version 0.5.
- __init__(root='data', modality=['mask', 'esa_wc', 'viirs', 's2_summer'], split='train', transforms=None, download=False, checksum=False)[source]#
Initialize a new MapInWild dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
modality (list[str]) – the modality to download. Choose from: “mask”, “esa_wc”, “viirs”, “s1”, “s2_temporal_subset”, “s2_[season]”.
split (str) – one of “train”, “validation”, or “test”
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:
AssertionError – if
splitargument is invalidDatasetNotFoundError – If dataset is not found and download is False.
- __len__()[source]#
Return the number of data points in the dataset.
- Returns:
length of the dataset
- Return type:
- plot(sample, show_titles=True, suptitle=None)[source]#
Plot a sample from the dataset.
- Parameters:
- Returns:
a matplotlib Figure with the rendered sample
- Return type:
- __annotate_func__()#
The type of the None singleton.