pipeline for single cluster
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user