Shortcuts

EuroSAT

class torchvision.datasets.EuroSAT(root: Union[str, Path], transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False)[source]

EuroSAT 数据集的RGB版本。

有关数据集的MS版本,请参见 TorchGeo

Parameters:
  • root (str 或 pathlib.Path) – 数据集的根目录,其中存在 root/eurosat

  • transform (callable, optional) – 一个函数/变换,接收一个PIL图像并返回一个变换后的版本。例如,transforms.RandomCrop

  • target_transform (callable, optional) – 一个函数/转换,它接收目标并对其进行转换。

  • 下载 (bool, 可选) – 如果为True,则从互联网下载数据集并将其放置在根目录中。如果数据集已经下载,则不会再次下载。默认值为False。

Special-members:

__getitem__(index: int) Tuple[Any, Any]
Parameters:

index (int) – 索引

Returns:

(sample, target) 其中 target 是目标类的 class_index。

Return type:

tuple