LandCover.ai#
- class torchgeo.datasets.LandCoverAI(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Bases:
LandCoverAIBase,NonGeoDatasetLandCover.ai dataset.
See the abstract LandCoverAIBase class to find out more.
Note
This dataset uses a pre-chipped version of the data available on HuggingFace. The pre-chipped dataset contains the output/ directory with 512x512 image chips and corresponding masks in JPG/PNG format.
- __init__(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Initialize a new LandCover.ai dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
split (Literal['train', 'val', 'test']) – 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:
AssertionError – if
splitargument is invalidDatasetNotFoundError – If dataset is not found and download is False.
- class torchgeo.datasets.LandCoverAI100(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Bases:
LandCoverAISubset of LandCoverAI containing only 100 images.
Intended for tutorials and demonstrations, not for benchmarking.
Maintains the same file structure, classes, and train-val-test split.
Added in version 0.7.