Spaces:
Runtime error
Runtime error
s194649 commited on
Commit ·
15a3702
1
Parent(s): 0457b5c
debug mode
Browse files18 unmodified lines1920212223242 unmodified lines2728293031323318 unmodified linesassert type(depth) == np.ndarrayrgb_mask = np.zeros((mask.shape[0], mask.shape[1], 3)).astype("uint8")rgb_mask[mask] = (255, 0, 0)depth_o3d = o3d.geometry.Image(depth)image_o3d = o3d.geometry.Image(rgb_mask)rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(image_o3d, depth_o3d, convert_rgb_to_intensity=False)2 unmodified lines# Step 4: Convert PointCloud data to a NumPy arraypoints = np.asarray(pcd.points)colors = np.asarray(pcd.colors)mask = (colors[:, 0] == 255)points = points[mask]colors = colors[mask]return points, colors18 unmodified lines192021222324252 unmodified lines28293031323334353637383918 unmodified linesassert type(depth) == np.ndarrayrgb_mask = np.zeros((mask.shape[0], mask.shape[1], 3)).astype("uint8")rgb_mask[mask] = (255, 0, 0)depth_o3d = o3d.geometry.Image(depth)image_o3d = o3d.geometry.Image(rgb_mask)rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(image_o3d, depth_o3d, convert_rgb_to_intensity=False)2 unmodified lines# Step 4: Convert PointCloud data to a NumPy arraypoints = np.asarray(pcd.points)colors = np.asarray(pcd.colors)print(np.unique(colors, axis=0))print(np.unique(colors, axis=1))print(np.unique(colors))mask = (colors[:, 0] == 255)print(mask.sum())print(colors.shape)points = points[mask]colors = colors[mask]return points, colors
inference.py+6