View Code? Open in Web Editor
NEW
Farthest Point Sampling Made Easy: A Python library leveraging NumPy for fast and resource-friendly selection of farthest points in large multidimensional datasets.
License: MIT License
farthest-point-sampling's People
Contributors
Watchers
farthest-point-sampling's Issues
Recently I am discovering techniques for high-performance FPS in CPU. I find this library quite useful and efficient.
But I also noticed that the performance could still be improved by the following one-line code:
def farthest_point_sampling (arr , n_sample , start_idx = None ):
"""
... ...
"""
# NOTE: column major layout for best performance
arr = np .asfortranarray (arr )
n_points , n_dim = arr .shape
... ...
Benchmark shows the differences:
Hope this could help :)