Table of Contents
Shortcuts

# KittiFlow

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

  KITTI dataset for optical flow (2015).

  The dataset is expected to have the following structure:

      root
          KittiFlow
              testing
                  image_2
              training
                  image_2
                  flow_occ

  Parameters:

    - root (string) – Root directory of the KittiFlow Dataset.

    - split (string, optional) – The dataset split, either “train” (default) or “test”

    - transforms (callable, optional) – A function/transform that takes in `img1, img2, flow, valid_flow_mask` and returns a transformed version.

  Special-members:

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

    Return example at given index.

    Parameters:

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

    Returns:

      A 4-tuple with `(img1, img2, flow, valid_flow_mask)` where `valid_flow_mask` is a numpy boolean mask of shape (H, W) indicating which flow values are valid. The flow is a numpy array of shape (2, H, W) and the images are PIL images. `flow` and `valid_flow_mask` are None if `split="test"`.

    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.