Spaces:
Runtime error
Runtime error
jens
commited on
Commit
·
369b1b2
1
Parent(s):
0f1c4a8
fix
Browse files- 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]
|