fps
Farthest point sampling (FPS) as a module returning sampled indices.
Classes:
-
FPS–Farthest point sampling as a module, returning the sampled indices.
FPS
¶
Bases: Module
Farthest point sampling as a module, returning the sampled indices.
Parameters:
-
ratio(float) –Fraction of points to keep per sample.
-
random_start(Optional[bool], default:None) –Whether farthest point sampling starts from a random point. With the default
None, the start is random in training mode and pinned in eval mode, so eval predictions are reproducible across runs.
Shape
- Input: positions of shape \((N, D)\) with an optional batch vector of shape \((N,)\).
- Output: sampled indices of shape \((M,)\) with \(M \approx N \cdot \text{ratio}\).