(self, data_dir_root, resize_shape)
| 81 | |
| 82 | class DDAD(Dataset): |
| 83 | def __init__(self, data_dir_root, resize_shape): |
| 84 | import glob |
| 85 | |
| 86 | # image paths are of the form <data_dir_root>/{outleft, depthmap}/*.png |
| 87 | self.image_files = glob.glob(os.path.join(data_dir_root, '*.png')) |
| 88 | self.depth_files = [r.replace("_rgb.png", "_depth.npy") |
| 89 | for r in self.image_files] |
| 90 | self.transform = ToTensor(resize_shape) |
| 91 | |
| 92 | def __getitem__(self, idx): |
| 93 |