Vaihingen#
- class torchgeo.datasets.Vaihingen2D(root='data', split='train', transforms=None, checksum=False)[source]#
Bases:
NonGeoDatasetVaihingen 2D Semantic Segmentation dataset.
The Vaihingen dataset is a dataset for urban semantic segmentation used in the 2D Semantic Labeling Contest - Vaihingen. This dataset uses the “ISPRS_semantic_labeling_Vaihingen.zip” and “ISPRS_semantic_labeling_Vaihingen_ground_truth_COMPLETE.zip” files to create the train/test sets used in the challenge. The dataset can be downloaded from here. Note, the server contains additional data for 3D Semantic Labeling which are currently not supported.
Dataset format:
images are 3-channel RGB geotiffs
masks are 3-channel geotiffs with unique RGB values representing the class
Dataset classes:
Clutter/background
Impervious surfaces
Building
Low Vegetation
Tree
Car
If you use this dataset in your research, please cite the following paper:
Added in version 0.2.
- __init__(root='data', split='train', transforms=None, checksum=False)[source]#
Initialize a new Vaihingen2D dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
split (str) – one of “train” 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
checksum (bool) – if True, check the MD5 of the downloaded files (may be slow)
- Raises:
AssertionError – If split is invalid.
DatasetNotFoundError – 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, alpha=0.5)[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.