add new_added_pts compute

This commit is contained in:
2024-10-01 14:51:45 +08:00
parent 16d1f8ab67
commit 7b28cf9e91
3 changed files with 19 additions and 0 deletions

2
pts.py
View File

@@ -19,6 +19,8 @@ class PtsUtil:
@staticmethod
def random_downsample_point_cloud(point_cloud, num_points):
if point_cloud.shape[0] == 0:
return point_cloud
idx = np.random.choice(len(point_cloud), num_points, replace=True)
return point_cloud[idx]