SkyScript#
- class torchgeo.datasets.SkyScript(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Bases:
NonGeoDatasetSkyScript dataset.
SkyScript is a large and semantically diverse image-text dataset for remote sensing images. It contains 5.2 million remote sensing image-text pairs in total, covering more than 29K distinct semantic tags.
If you use this dataset in your research, please cite it using the following format:
Added in version 0.6.
- caption_files: ClassVar[dict[str, str]] = {'test': 'SkyScript_test_30K_filtered_by_CLIP_openai.csv', 'train': 'SkyScript_train_top30pct_filtered_by_CLIP_openai.csv', 'val': 'SkyScript_val_5K_filtered_by_CLIP_openai.csv'}#
Can be modified in subclasses to change train/val/test split
- __init__(root='data', split='train', transforms=None, download=False, checksum=False)[source]#
Initialize a new SkyScript instance.
- Parameters:
root (str | PathLike[str]) – Root directory where dataset can be found.
split (str) – One of ‘train’, ‘val’, ‘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 split is invalid.
DatasetNotFoundError – If dataset is not found and download is False.
- __len__()[source]#
Return the number of images in the dataset.
- Returns:
Length of the dataset.
- Return type:
- __annotate_func__()#
The type of the None singleton.