Spaces:
Sleeping
Sleeping
build error debug
Browse files- app.py +6 -11
- requirements.txt +2 -0
app.py
CHANGED
@@ -1,20 +1,15 @@
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
-
|
3 |
-
from functools import partial
|
4 |
import torch
|
5 |
from torch_geometric.nn import knn
|
|
|
6 |
import gradio as gr
|
7 |
-
import os
|
8 |
-
import glob
|
9 |
-
import pickle
|
10 |
-
import time
|
11 |
-
import cv2
|
12 |
-
import numpy as np
|
13 |
import matplotlib.pyplot as plt
|
14 |
-
import plotly.graph_objects as go
|
15 |
import open3d as o3d
|
16 |
import trimesh
|
17 |
-
|
18 |
|
19 |
|
20 |
|
@@ -173,7 +168,7 @@ def compute_centroids(data, labels):
|
|
173 |
for label in unique_labels:
|
174 |
mask = labels == label
|
175 |
points = data[mask]
|
176 |
-
centroid =
|
177 |
centroids.append(centroid)
|
178 |
return np.stack(centroids)
|
179 |
|
|
|
1 |
+
import os
|
2 |
+
import pickle
|
3 |
import numpy as np
|
4 |
+
|
|
|
5 |
import torch
|
6 |
from torch_geometric.nn import knn
|
7 |
+
|
8 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
import matplotlib.pyplot as plt
|
|
|
10 |
import open3d as o3d
|
11 |
import trimesh
|
12 |
+
|
13 |
|
14 |
|
15 |
|
|
|
168 |
for label in unique_labels:
|
169 |
mask = labels == label
|
170 |
points = data[mask]
|
171 |
+
centroid = np.mean(points, axis=0)
|
172 |
centroids.append(centroid)
|
173 |
return np.stack(centroids)
|
174 |
|
requirements.txt
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
trimesh
|
2 |
open3d
|
|
|
|
|
3 |
torch_geometric
|
4 |
torch_scatter
|
5 |
-f https://data.pyg.org/whl/torch-2.3.0+cpu.html
|
|
|
1 |
trimesh
|
2 |
open3d
|
3 |
+
|
4 |
+
torch
|
5 |
torch_geometric
|
6 |
torch_scatter
|
7 |
-f https://data.pyg.org/whl/torch-2.3.0+cpu.html
|