Spaces:
Runtime error
Runtime error
s194649
commited on
Commit
·
19a222e
1
Parent(s):
aed7a48
fix
Browse files- inference.py +1 -1
inference.py
CHANGED
@@ -149,9 +149,9 @@ class DepthPredictor:
|
|
149 |
def generate_obj_rgb(self, image, n_samples, cube_size, max_depth, min_depth):
|
150 |
# Step 1: Create a point cloud
|
151 |
depth = self.predict(image)
|
|
|
152 |
depth = map_image_range(depth, min_depth, max_depth)
|
153 |
point_cloud, color_array = PCL_rgb(image, depth)
|
154 |
-
image = np.array(image)
|
155 |
idxs = np.random.choice(len(point_cloud), int(n_samples))
|
156 |
point_cloud = point_cloud[idxs]
|
157 |
color_array = color_array[idxs]
|
|
|
149 |
def generate_obj_rgb(self, image, n_samples, cube_size, max_depth, min_depth):
|
150 |
# Step 1: Create a point cloud
|
151 |
depth = self.predict(image)
|
152 |
+
image = np.array(image)
|
153 |
depth = map_image_range(depth, min_depth, max_depth)
|
154 |
point_cloud, color_array = PCL_rgb(image, depth)
|
|
|
155 |
idxs = np.random.choice(len(point_cloud), int(n_samples))
|
156 |
point_cloud = point_cloud[idxs]
|
157 |
color_array = color_array[idxs]
|