Shortcuts

Kitti

class torchvision.datasets.Kitti(root: str, train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, transforms: Optional[Callable] = None, download: bool = False)[source]

KITTI Dataset.

It corresponds to the “left color images of object” dataset, for object detection.

Parameters
  • root (string) –

    Root directory where images are downloaded to. Expects the following folder structure if download=False:

    <root>
        └── Kitti
            └─ raw
                ├── training
                |   ├── image_2
                |   └── label_2
                └── testing
                    └── image_2
    

  • train (bool, optional) – Use train split if true, else test split. Defaults to train.

  • transform (callable, optional) – A function/transform that takes in a PIL image and returns a transformed version. E.g, transforms.PILToTensor

  • target_transform (callable, optional) – A function/transform that takes in the target and transforms it.

  • transforms (callable, optional) – A function/transform that takes input sample and its target as entry and returns a transformed version.

  • download (bool, optional) – If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again.

Special-members

__getitem__(index: int)Tuple[Any, Any][source]

Get item at a given index.

Parameters

index (int) – Index

Returns

(image, target), where target is a list of dictionaries with the following keys:

  • type: str

  • truncated: float

  • occluded: int

  • alpha: float

  • bbox: float[4]

  • dimensions: float[3]

  • locations: float[3]

  • rotation_y: float

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