Datasets:
Size:
10K<n<100K
License:
fix
Browse files- tomatotest.py +6 -5
tomatotest.py
CHANGED
@@ -21,11 +21,12 @@ class RGBSemanticDepthDataset(GeneratorBasedBuilder):
|
|
21 |
# Reference: https://github.com/dwofk/fast-depth/blob/master/dataloaders/dataloader.py#L8-L13
|
22 |
f = io.BytesIO(bytes_stream)
|
23 |
h5f = h5py.File(f, "r")
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
29 |
print(left_rgb.shape, left_depth.shape, left_seg.shape)
|
30 |
return left_rgb, right_rgb, left_seg, left_depth, right_depth
|
31 |
def _read_jpg(self, bytes_stream):
|
|
|
21 |
# Reference: https://github.com/dwofk/fast-depth/blob/master/dataloaders/dataloader.py#L8-L13
|
22 |
f = io.BytesIO(bytes_stream)
|
23 |
h5f = h5py.File(f, "r")
|
24 |
+
print(h5f)
|
25 |
+
left_rgb = self._read_jpg(h5f['rgb_left'][:])
|
26 |
+
right_rgb = self._read_jpg(h5f['rgb_right'][:])
|
27 |
+
left_seg = h5f['seg_left'][:]
|
28 |
+
left_depth = h5f['depth_left'][:].astype(np.float32)
|
29 |
+
right_depth = h5f['depth_right'][:].astype(np.float32)
|
30 |
print(left_rgb.shape, left_depth.shape, left_seg.shape)
|
31 |
return left_rgb, right_rgb, left_seg, left_depth, right_depth
|
32 |
def _read_jpg(self, bytes_stream):
|