Fields Of The World#
- class torchgeo.datasets.FieldsOfTheWorld(root='data', split='train', target='2-class', countries=['austria'], transforms=None, download=False, checksum=False)[source]#
Bases:
NonGeoDatasetFields Of The World dataset.
The Fields Of The World datataset is a semantic and instance segmentation dataset for delineating field boundaries.
Dataset features:
70462 patches across 24 countries
Each country has a train, val, and test split
Semantic segmentations masks with and without the field boundary class
Instance segmentation masks
Dataset format:
images are four-channel GeoTIFFs with dimension 256x256
segmentation masks (both two and three class) are single-channel GeoTIFFs
instance masks are single-channel GeoTIFFs
Dataset classes:
background
field
field-boundary (three-class only)
unlabeled (kenya, rwanda, brazil and india have presence only labels)
If you use this dataset in your research, please cite the following paper:
Added in version 0.7.
- __init__(root='data', split='train', target='2-class', countries=['austria'], transforms=None, download=False, checksum=False)[source]#
Initialize a new Fields Of The World dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
split (str) – one of “train”, “val”, or “test”
target (str) – one of “2-class”, “3-class”, or “instance” specifying which kind of target mask to load
countries (str | Sequence[str]) – which set of countries to load data from
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 any arguments are invalid.
DatasetNotFoundError – If dataset is not found and download is False.
- __len__()[source]#
Return the number of datapoints in the dataset.
- Returns:
length of dataset
- Return type:
- __annotate_func__()#
The type of the None singleton.