Table of Contents
Shortcuts

# CREStereo

class torchvision.datasets.CREStereo(root: str, transforms: Optional[Callable] = None)

  Synthetic dataset used in training the CREStereo architecture. Dataset details on the official paper repo.

  The dataset is expected to have the following structure:

      root
          CREStereo
              tree
                  img1_left.jpg
                  img1_right.jpg
                  img1_left.disp.jpg
                  img1_right.disp.jpg
                  img2_left.jpg
                  img2_right.jpg
                  img2_left.disp.jpg
                  img2_right.disp.jpg
                  ...
              shapenet
                  img1_left.jpg
                  img1_right.jpg
                  img1_left.disp.jpg
                  img1_right.disp.jpg
                  ...
              reflective
                  img1_left.jpg
                  img1_right.jpg
                  img1_left.disp.jpg
                  img1_right.disp.jpg
                  ...
              hole
                  img1_left.jpg
                  img1_right.jpg
                  img1_left.disp.jpg
                  img1_right.disp.jpg
                  ...

  Parameters:

    - root (str) – Root directory of the dataset.

    - transforms (callable, optional) – A function/transform that takes in a sample and returns a transformed version.

  Special-members:

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

    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)`. The disparity is a numpy array of shape (1, H, W) and the images are PIL images. `valid_mask` is implicitly `None` if the `transforms` parameter does not generate a valid mask.

    Return type:

      tuple

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.