Spaces:
Runtime error
Runtime error
s194649
commited on
Commit
·
ba4f873
1
Parent(s):
a057615
debug
Browse files- app.py +1 -1
- inference.py +2 -1
app.py
CHANGED
@@ -176,4 +176,4 @@ with block:
|
|
176 |
|
177 |
if __name__ == '__main__':
|
178 |
block.queue()
|
179 |
-
block.launch(
|
|
|
176 |
|
177 |
if __name__ == '__main__':
|
178 |
block.queue()
|
179 |
+
block.launch()
|
inference.py
CHANGED
@@ -37,7 +37,7 @@ def PCL(mask, depth):
|
|
37 |
assert type(depth) == np.ndarray
|
38 |
rgb_mask = np.zeros((mask.shape[0], mask.shape[1], 3)).astype("uint8")
|
39 |
rgb_mask[mask] = (255, 0, 0)
|
40 |
-
print
|
41 |
depth_o3d = o3d.geometry.Image(depth)
|
42 |
image_o3d = o3d.geometry.Image(rgb_mask)
|
43 |
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(image_o3d, depth_o3d, convert_rgb_to_intensity=False)
|
@@ -167,6 +167,7 @@ class DepthPredictor:
|
|
167 |
image = np.array(image)
|
168 |
mesh = o3d.geometry.TriangleMesh()
|
169 |
# Create cubes and add them to the mesh
|
|
|
170 |
cs = [(255,0,0),(0,255,0),(0,0,255)]
|
171 |
for c,(mask, _) in zip(cs, masks):
|
172 |
points, _ = PCL(mask, depth)
|
|
|
37 |
assert type(depth) == np.ndarray
|
38 |
rgb_mask = np.zeros((mask.shape[0], mask.shape[1], 3)).astype("uint8")
|
39 |
rgb_mask[mask] = (255, 0, 0)
|
40 |
+
print(mask.sum())
|
41 |
depth_o3d = o3d.geometry.Image(depth)
|
42 |
image_o3d = o3d.geometry.Image(rgb_mask)
|
43 |
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(image_o3d, depth_o3d, convert_rgb_to_intensity=False)
|
|
|
167 |
image = np.array(image)
|
168 |
mesh = o3d.geometry.TriangleMesh()
|
169 |
# Create cubes and add them to the mesh
|
170 |
+
print(len(masks))
|
171 |
cs = [(255,0,0),(0,255,0),(0,0,255)]
|
172 |
for c,(mask, _) in zip(cs, masks):
|
173 |
points, _ = PCL(mask, depth)
|