XingjianL commited on
Commit
4973c42
1 Parent(s): 8244ccb
Files changed (1) hide show
  1. 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
- left_rgb = self._read_jpg(h5f['rgb_left'])
25
- right_rgb = self._read_jpg(h5f['rgb_right'])
26
- left_seg = h5f['seg_left']
27
- left_depth = h5f['depth_left'].astype(np.float32)
28
- right_depth = h5f['depth_right'].astype(np.float32)
 
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):