快捷方式

SintelStereo

class torchvision.datasets.SintelStereo(root: Union[str, Path], pass_name: str = 'final', transforms: Optional[Callable] = None)[源代码]

Sintel 立体数据集

预计数据集结构如下:

root
    Sintel
        training
            final_left
                scene1
                    img1.png
                    img2.png
                    ...
                ...
            final_right
                scene2
                    img1.png
                    img2.png
                    ...
                ...
            disparities
                scene1
                    img1.png
                    img2.png
                    ...
                ...
            occlusions
                scene1
                    img1.png
                    img2.png
                    ...
                ...
            outofframe
                scene1
                    img1.png
                    img2.png
                    ...
                ...
参数:
  • root (str 或 pathlib.Path) – Sintel Stereo 所在的根目录。

  • pass_name (string) – 要使用的通道的名称,可以是 “final”、“clean” 或 “both”。

  • transforms (callable, optional) – 一个函数/变换,接收一个样本并返回一个变换后的版本。

特殊成员:

__getitem__(index: int) tuple[PIL.Image.Image, PIL.Image.Image, Optional[numpy.ndarray]][源代码]

在给定索引处返回示例。

参数:

index (int) – 要检索的示例的索引

返回:

返回一个 4 元组,其中包含 (img_left, img_right, disparity, valid_mask)。视差是一个形状为 (1, H, W) 的 numpy 数组,图像是 PIL 图像,而有效掩码是一个形状为 (H, W) 的 numpy 数组。

返回类型:

元组

文档

访问全面的 PyTorch 开发者文档

查看文档

教程

为初学者和高级开发者提供深入的教程

查看教程

资源

查找开发资源并让您的问题得到解答

查看资源