PASTIS#
- class torchgeo.datasets.PASTIS(root='data', folds=(1, 2, 3, 4, 5), bands='s2', mode='semantic', transforms=None, download=False, checksum=False)[source]#
Bases:
NonGeoDatasetPASTIS dataset.
The PASTIS dataset is a dataset for time-series panoptic segmentation of agricultural parcels.
Dataset features:
support for the original PASTIS and PASTIS-R versions of the dataset
2,433 time-series with 10 m per pixel resolution (128x128 px)
18 crop categories, 1 background category, 1 void category
semantic and instance annotations
3 Sentinel-1 Ascending bands
3 Sentinel-1 Descending bands
10 Sentinel-2 L2A multispectral bands
Dataset format:
time-series and annotations are in numpy format (.npy)
Dataset classes:
Background
Meadow
Soft Winter Wheat
Corn
Winter Barley
Winter Rapeseed
Spring Barley
Sunflower
Grapevine
Beet
Winter Triticale
Winter Durum Wheat
Fruits Vegetables Flowers
Potatoes
Leguminous Fodder
Soybeans
Orchard
Mixed Cereal
Sorghum
Void Label
If you use this dataset in your research, please cite the following papers:
Added in version 0.5.
- __init__(root='data', folds=(1, 2, 3, 4, 5), bands='s2', mode='semantic', transforms=None, download=False, checksum=False)[source]#
Initialize a new PASTIS dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
folds (Sequence[int]) – a sequence of integers from 0 to 4 specifying which of the five dataset folds to include
bands (str) – load Sentinel-1 ascending path data (s1a), Sentinel-1 descending path data (s1d), or Sentinel-2 data (s2)
mode (str) – load semantic (semantic) or instance (instance) annotations
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.
- __len__()[source]#
Return the number of data points in the dataset.
- Returns:
length of the dataset
- Return type:
- __annotate_func__()#
The type of the None singleton.