MCPcopy Create free account
hub / github.com/Zhiyuan-R/Tiger-Diffusion / upsample_point_cloud

Function upsample_point_cloud

datasets/partnet.py:68–77  ·  view source on GitHub ↗

upsample points by random choice :param points: (n, 3) :param n_pts: int, > n :return:

(points, n_pts)

Source from the content-addressed store, hash-verified

66
67
68def upsample_point_cloud(points, n_pts):
69 """upsample points by random choice
70 :param points: (n, 3)
71 :param n_pts: int, > n
72 :return:
73 """
74 p_idx = random.choices(list(range(points.shape[0])), k=n_pts - points.shape[0])
75 dup_points = points[p_idx]
76 points = np.concatenate([points, dup_points], axis=0)
77 return points
78
79
80def sample_point_cloud_by_n(points, n_pts):

Callers 1

sample_point_cloud_by_nFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected