SintelStereo — Torchvision 0.22 documentation (original) (raw)

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

Sintel Stereo Dataset.

The dataset is expected to have the following structure:

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 ... ...

Parameters:

Special-members:

__getitem__(index: int) → Tuple[Image, Image, Optional[ndarray]][source]

Return example at given index.

Parameters:

index (int) – The index of the example to retrieve

Returns:

A 4-tuple with (img_left, img_right, disparity, valid_mask) is returned. The disparity is a numpy array of shape (1, H, W) and the images are PIL images whilst the valid_mask is a numpy array of shape (H, W).

Return type:

tuple