Spaces:
Runtime error
Runtime error
s194649
commited on
Commit
·
ae1d3bb
1
Parent(s):
8efff47
fix
Browse files- inference.py +3 -3
inference.py
CHANGED
|
@@ -40,13 +40,13 @@ def PCL(mask, depth):
|
|
| 40 |
print(np.unique(rgb_mask))
|
| 41 |
depth_o3d = o3d.geometry.Image(depth)
|
| 42 |
image_o3d = o3d.geometry.Image(rgb_mask)
|
| 43 |
-
print(len(depth_o3d))
|
| 44 |
-
print(len(image_o3d))
|
| 45 |
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(image_o3d, depth_o3d, convert_rgb_to_intensity=False)
|
| 46 |
# Step 3: Create a PointCloud from the RGBD image
|
| 47 |
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd_image, o3d.camera.PinholeCameraIntrinsic(o3d.camera.PinholeCameraIntrinsicParameters.PrimeSenseDefault))
|
| 48 |
# Step 4: Convert PointCloud data to a NumPy array
|
| 49 |
-
print(len(pcd))
|
| 50 |
points = np.asarray(pcd.points)
|
| 51 |
colors = np.asarray(pcd.colors)
|
| 52 |
print(np.unique(colors, axis=0))
|
|
|
|
| 40 |
print(np.unique(rgb_mask))
|
| 41 |
depth_o3d = o3d.geometry.Image(depth)
|
| 42 |
image_o3d = o3d.geometry.Image(rgb_mask)
|
| 43 |
+
#print(len(depth_o3d))
|
| 44 |
+
#print(len(image_o3d))
|
| 45 |
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(image_o3d, depth_o3d, convert_rgb_to_intensity=False)
|
| 46 |
# Step 3: Create a PointCloud from the RGBD image
|
| 47 |
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd_image, o3d.camera.PinholeCameraIntrinsic(o3d.camera.PinholeCameraIntrinsicParameters.PrimeSenseDefault))
|
| 48 |
# Step 4: Convert PointCloud data to a NumPy array
|
| 49 |
+
#print(len(pcd))
|
| 50 |
points = np.asarray(pcd.points)
|
| 51 |
colors = np.asarray(pcd.colors)
|
| 52 |
print(np.unique(colors, axis=0))
|