update scan_points strategy

This commit is contained in:
2024-10-02 16:24:13 +08:00
parent 551282a0ec
commit c8b8a44252
6 changed files with 120 additions and 50 deletions

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]