CarlaStereo¶
- class torchvision.datasets.CarlaStereo(root: str, transforms: Optional[Callable] = None)[source]¶
Carla simulator data linked in the CREStereo github repo.
The dataset is expected to have the following structure:
root carla-highres trainingF scene1 img0.png img1.png disp0GT.pfm disp1GT.pfm calib.txt scene2 img0.png img1.png disp0GT.pfm disp1GT.pfm calib.txt ...
- Parameters:
root (string) – Root directory where carla-highres is located.
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 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 avalid_mask
is generated within thetransforms
parameter, a 4-tuple with(img_left, img_right, disparity, valid_mask)
is returned.- Return type: