Flowers102¶
- class torchvision.datasets.Flowers102(root: Union[str, Path], split: str = 'train', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False)[source]¶
牛津 102 种鲜花 数据集。
警告
此类需要 scipy 加载 .mat 格式的目标文件。
牛津 102 种鲜花是一个图像分类数据集,由 102 种鲜花类别组成。这些花卉被选为英国常见的花卉。每个类别包含 40 到 258 张图像。
这些图像具有大的比例、姿势和光照变化。此外,还有类别内部差异很大的类别,以及几个非常相似的类别。
- 参数:
root (str 或
pathlib.Path
) – 数据集的根目录。split (string, 可选) – 数据集拆分,支持
"train"
(默认),"val"
, 或"test"
。transform (callable, 可选) – 接收 PIL 图像并返回转换后版本的功能/转换。例如,
transforms.RandomCrop
。target_transform (callable, 可选) – 接收目标并对其进行转换的功能/转换。
download (bool, 可选) – 如果为 true,则从互联网下载数据集并将其放在根目录中。如果已下载数据集,则不会再次下载。
- 特殊成员: