Kitti2015Stereo¶
- class torchvision.datasets.Kitti2015Stereo(root: str, split: str = 'train', transforms: Optional[Callable] = None)[source]¶
KITTI dataset from the 2015 stereo evaluation benchmark.
The dataset is expected to have the following structure:
root Kitti2015 testing image_2 img1.png img2.png ... image_3 img1.png img2.png ... training image_2 img1.png img2.png ... image_3 img1.png img2.png ... disp_occ_0 img1.png img2.png ... disp_occ_1 img1.png img2.png ... calib
- Parameters:
root (string) – Root directory where Kitti2015 is located.
split (string, optional) – The dataset split of scenes, either “train” (default) or “test”.
transforms (callable, optional) – A function/transform that takes in a sample and returns a transformed version.
- Special-members:
- __getitem__(index: int) Tuple [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)
. The disparity is a numpy array of shape (1, H, W) and the images are PIL images.valid_mask
is implicitlyNone
if thetransforms
parameter does not generate a valid mask. Bothdisparity
andvalid_mask
areNone
if the dataset split is test.- Return type: