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

Function furthest_point_sample

modules/functional/sampling.py:37–48  ·  view source on GitHub ↗

Uses iterative furthest point sampling to select a set of npoint features that have the largest minimum distance to the sampled point set :param coords: coordinates of points, FloatTensor[B, 3, N] :param num_samples: int, M :return: centers_coords: coordinates of sampled

(coords, num_samples)

Source from the content-addressed store, hash-verified

35
36
37def furthest_point_sample(coords, num_samples):
38 """
39 Uses iterative furthest point sampling to select a set of npoint features that have the largest
40 minimum distance to the sampled point set
41 :param coords: coordinates of points, FloatTensor[B, 3, N]
42 :param num_samples: int, M
43 :return:
44 centers_coords: coordinates of sampled centers, FloatTensor[B, 3, M]
45 """
46 coords = coords.contiguous()
47 indices = _backend.furthest_point_sampling(coords, num_samples)
48 return gather(coords, indices)
49
50
51def logits_mask(coords, logits, num_points_per_object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected