Table of Contents
Shortcuts

# InStereo2k

class torchvision.datasets.InStereo2k(root: str, split: str = 'train', transforms: Optional[Callable] = None)

  InStereo2k dataset.

  The dataset is expected to have the following structure:

      root
          InStereo2k
              train
                  scene1
                      left.png
                      right.png
                      left_disp.png
                      right_disp.png
                      ...
                  scene2
                  ...
              test
                  scene1
                      left.png
                      right.png
                      left_disp.png
                      right_disp.png
                      ...
                  scene2
                  ...

  Parameters:

    - root (string) – Root directory where InStereo2k is located.

    - split (string) – Either “train” or “test”.

    - 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 3-tuple with `(img_left, img_right, disparity)`. The disparity is a numpy array of shape (1, H, W) and the images are PIL images. If a `valid_mask` is generated within the `transforms` parameter, a 4-tuple with `(img_left, img_right, disparity, valid_mask)` is returned.

    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.