Giter Club home page Giter Club logo

farthest-point-sampling-torch's Introduction

Farthest Point Sampling (FPS)

This repo is a vanilla implementation of 3D farthest-point-sampling (FPS) algorithm in paper:

"Eldar, Yuval, Michael Lindenbaum, Moshe Porat, and Yehoshua Y. Zeevi. "The farthest point strategy for progressive image sampling." IEEE Transactions on Image Processing 6, no. 9 (1997): 1305-1315."

The most important equation is eq. 2.6.

Two demos are avaible in this repo:

  1. main_sample.py: demonstrates how the points are sampled in FPS and provides a function to visulise sampling process step by step.
  2. main_group.py: A simple point grouping method which groups points using a fix radius sphere over the FPS sampled points.

Install Dependencies:

conda install numpy
conda install -c open3d-admin open3d=0.7

Usage

To simply run the fps sampling demo:

python main_sample.py

To simply run the fps grouping demo:

python main_group.py

Other parameters can be set:

  • --n_samples: num of samples.
  • --data: choose an example data to load, available options are "bunny", "circle", "eclipse", or you can set it to a path points to your ply file.
  • --manually_step: (only in main_sample) step the sampling process manully by pressing "N/n" key.
  • --group_radius: (only in main_group) set the grouping radius.

Example:

python main_sample.py --data="circle" --n_samples=50 --manually_step=True
python main_group.py --data="circle" --n_samples=50 --group_radius=0.06

farthest-point-sampling-torch's People

Contributors

ziruiw-dev avatar iamwilliamli avatar

Watchers

James Cloos avatar

Forkers

employeesns

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.