UC Merced#
- class torchgeo.datasets.UCMerced(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Bases:
NonGeoClassificationDatasetUC Merced Land Use dataset.
The UC Merced Land Use dataset is a land use classification dataset of 2.1k 256x256 1ft resolution RGB images of urban locations around the U.S. extracted from the USGS National Map Urban Area Imagery collection with 21 land use classes (100 images per class).
Dataset features:
land use class labels from around the U.S.
three spectral bands - RGB
21 classes
Dataset classes:
agricultural
airplane
baseballdiamond
beach
buildings
chaparral
denseresidential
forest
freeway
golfcourse
harbor
intersection
mediumresidential
mobilehomepark
overpass
parkinglot
river
runway
sparseresidential
storagetanks
tenniscourt
This dataset uses the train/val/test splits defined in the “In-domain representation learning for remote sensing” paper:
If you use this dataset in your research, please cite the following paper:
- __init__(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Initialize a new UC Merced dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
split (str) – one of “train”, “val”, 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:
DatasetNotFoundError – If dataset is not found and download is False.
- 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:
Added in version 0.2.
- __annotate_func__()#
The type of the None singleton.