Spaces:
Paused
Paused
remove o3d
Browse files- gradio_util.py +10 -10
gradio_util.py
CHANGED
|
@@ -2,7 +2,7 @@ try:
|
|
| 2 |
import os
|
| 3 |
|
| 4 |
import trimesh
|
| 5 |
-
import open3d as o3d
|
| 6 |
|
| 7 |
import gradio as gr
|
| 8 |
import numpy as np
|
|
@@ -67,17 +67,17 @@ def vggsfm_predictions_to_glb(predictions) -> trimesh.Scene:
|
|
| 67 |
)
|
| 68 |
|
| 69 |
|
| 70 |
-
if True:
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
|
| 82 |
|
| 83 |
|
|
|
|
| 2 |
import os
|
| 3 |
|
| 4 |
import trimesh
|
| 5 |
+
# import open3d as o3d
|
| 6 |
|
| 7 |
import gradio as gr
|
| 8 |
import numpy as np
|
|
|
|
| 67 |
)
|
| 68 |
|
| 69 |
|
| 70 |
+
# if True:
|
| 71 |
+
# pcd = o3d.geometry.PointCloud()
|
| 72 |
+
# pcd.points = o3d.utility.Vector3dVector(vertices_3d)
|
| 73 |
+
# pcd.colors = o3d.utility.Vector3dVector(colors_rgb)
|
| 74 |
|
| 75 |
+
# cl, ind = pcd.remove_statistical_outlier(nb_neighbors=20, std_ratio=1.0)
|
| 76 |
+
# filtered_pcd = pcd.select_by_index(ind)
|
| 77 |
|
| 78 |
+
# print(f"Filter out {len(vertices_3d) - len(filtered_pcd.points)} 3D points")
|
| 79 |
+
# vertices_3d = np.asarray(filtered_pcd.points)
|
| 80 |
+
# colors_rgb = np.asarray(filtered_pcd.colors).astype(np.uint8)
|
| 81 |
|
| 82 |
|
| 83 |
|