XingjianL commited on
Commit
058f64f
1 Parent(s): baa822b
Files changed (1) hide show
  1. tomatotest.py +2 -2
tomatotest.py CHANGED
@@ -47,12 +47,12 @@ class RGBSemanticDepthDataset(GeneratorBasedBuilder):
47
  return left_rgb, right_rgb, np.zeros((1,1)), np.zeros((1,1)), left_depth, right_depth
48
  elif type_dataset == 'seg':
49
  left_semantic = h5f['seg_left'][:][:,:,2]
50
- left_instance = h5f['seg_left'][:][:,:,0] * 256 + h5f['seg_left'][:][:,:,1]
51
  return left_rgb, np.zeros((1,1)), left_semantic, left_instance, np.zeros((1,1)), np.zeros((1,1))
52
  else:
53
  right_rgb = self._read_jpg(h5f['rgb_right'][:])
54
  left_semantic = h5f['seg_left'][:][:,:,2]
55
- left_instance = h5f['seg_left'][:][:,:,0] * 256 + h5f['seg_left'][:][:,:,1]
56
  left_depth = h5f['depth_left'][:].astype(np.float32)
57
  right_depth = h5f['depth_right'][:].astype(np.float32)
58
  return left_rgb, right_rgb, left_semantic, left_instance, left_depth, right_depth
 
47
  return left_rgb, right_rgb, np.zeros((1,1)), np.zeros((1,1)), left_depth, right_depth
48
  elif type_dataset == 'seg':
49
  left_semantic = h5f['seg_left'][:][:,:,2]
50
+ left_instance = h5f['seg_left'][:][:,:,0] + h5f['seg_left'][:][:,:,1] * 256
51
  return left_rgb, np.zeros((1,1)), left_semantic, left_instance, np.zeros((1,1)), np.zeros((1,1))
52
  else:
53
  right_rgb = self._read_jpg(h5f['rgb_right'][:])
54
  left_semantic = h5f['seg_left'][:][:,:,2]
55
+ left_instance = h5f['seg_left'][:][:,:,0] + h5f['seg_left'][:][:,:,1] * 256
56
  left_depth = h5f['depth_left'][:].astype(np.float32)
57
  right_depth = h5f['depth_right'][:].astype(np.float32)
58
  return left_rgb, right_rgb, left_semantic, left_instance, left_depth, right_depth