jens commited on
Commit
369b1b2
·
1 Parent(s): 0f1c4a8
Files changed (1) hide show
  1. inference.py +1 -1
inference.py CHANGED
@@ -73,7 +73,7 @@ class DepthPredictor:
73
  def generate_obj(self, image, n_samples, mask):
74
  # Step 1: Create a point cloud
75
  point_cloud, color_array = self.generate_pcl(image)
76
- point_cloud, color_array = point_cloud[mask.ravel()], color_array[mask.ravel()]
77
  # sample 1000 points
78
  idxs = np.random.choice(len(point_cloud), int(n_samples))
79
  point_cloud = point_cloud[idxs]
 
73
  def generate_obj(self, image, n_samples, mask):
74
  # Step 1: Create a point cloud
75
  point_cloud, color_array = self.generate_pcl(image)
76
+ point_cloud, color_array = point_cloud[mask.ravel()[:-1]], color_array[mask.ravel()[:-1]]
77
  # sample 1000 points
78
  idxs = np.random.choice(len(point_cloud), int(n_samples))
79
  point_cloud = point_cloud[idxs]