Загрузка
Dataset interface for Scene Flow datasets. This interface provides access to the FlyingThings3D, `Monkaa and Driving datasets.
The dataset is expected to have the following structure:
root
SceneFlow
Monkaa
frames_cleanpass
scene1
left
img1.png
img2.png
right
img1.png
img2.png
scene2
left
img1.png
img2.png
right
img1.png
img2.png
frames_finalpass
scene1
left
img1.png
img2.png
right
img1.png
img2.png
...
...
disparity
scene1
left
img1.pfm
img2.pfm
right
img1.pfm
img2.pfm
FlyingThings3D
...
...
root (str or pathlib.Path) – Root directory where SceneFlow is located.
variant (string) – Which dataset variant to user, “FlyingThings3D” (default), “Monkaa” or “Driving”.
pass_name (string) – Which pass to use, “clean” (default), “final” or “both”.
transforms (callable, optional) – A function/transform that takes in a sample and returns a transformed version.
Return example at given index.
index (int) – The index of the example to retrieve
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.