pipeline for single cluster

This commit is contained in:
Si11ium
2020-06-24 10:49:10 +02:00
parent 85cf3128f1
commit 965b805ee9
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -103,10 +103,6 @@ def cluster_per_column(pc, column):
def cluster_cubes(data, cluster_dims, max_points_per_cluster=-1, min_points_per_cluster=-1):
if cluster_dims[0] == 1 and cluster_dims[1] == 1 and cluster_dims[2] == 1:
print("no need to cluster.")
return [farthest_point_sampling(data, max_points_per_cluster)]
if isinstance(data, Data):
import torch
candidate_list = list()
@@ -119,6 +115,10 @@ def cluster_cubes(data, cluster_dims, max_points_per_cluster=-1, min_points_per_
data = torch.cat(candidate_list, dim=-1).numpy()
if cluster_dims[0] == 1 and cluster_dims[1] == 1 and cluster_dims[2] == 1:
print("no need to cluster.")
return [farthest_point_sampling(data, max_points_per_cluster)]
max = data[:, :3].max(axis=0)
max += max * 0.01