jens commited on
Commit
c09fa67
·
1 Parent(s): 0b87dc6

depth adjusted

Browse files
Files changed (1) hide show
  1. inference.py +2 -2
inference.py CHANGED
@@ -36,10 +36,10 @@ class DepthPredictor:
36
  output = prediction.cpu().numpy()
37
  formatted = (output * 255 / np.max(output)).astype('uint8')
38
  #img = Image.fromarray(formatted)
39
- return formatted
40
 
41
  def generate_pcl(self, image):
42
- depth = 255 - self.predict(image)
43
  # Step 2: Create an RGBD image from the RGB and depth image
44
  depth_o3d = o3d.geometry.Image(depth)
45
  image_o3d = o3d.geometry.Image(np.array(image))
 
36
  output = prediction.cpu().numpy()
37
  formatted = (output * 255 / np.max(output)).astype('uint8')
38
  #img = Image.fromarray(formatted)
39
+ return output
40
 
41
  def generate_pcl(self, image):
42
+ depth = self.predict(image)
43
  # Step 2: Create an RGBD image from the RGB and depth image
44
  depth_o3d = o3d.geometry.Image(depth)
45
  image_o3d = o3d.geometry.Image(np.array(image))