GithubHelp home page GithubHelp logo

hcp6897 / chamfer-distance-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from um-arm-lab/chamfer-distance-api

0.0 1.0 0.0 11 KB

A python class that calculates chamfer distance between point clouds using tensorflow

Makefile 3.76% C++ 55.19% Python 21.76% Cuda 19.29%

chamfer-distance-api's Introduction

Chamfer Distance API

Chamfer Distance (CD) is a evaluation metric for two point clouds. It takes the distance of each points into account. For each point in each cloud, CD finds the nearest point in the other point set, and sums the square of distance up. It is utilized in Shapenet’s shape reconstruction challenge.

The chamfer distance between point cloud S1 and S2 is defined as

This readme is a guidance on how to compile the code for chamfer distance and a tutorial to use chamfer distance api.

Prerequisites

Compiling the chamfer-distance code

The folder chamfer-distance contains tensorflow module for chamfer-distance. To compile them, make sure tensorflow is installed. Then, modify the first 4 lines of chamfer-distance/Makefile according to your environment. Finally, compile the chamfer-distance code

# From chamfer-distance/
make

To test the code, try

# From chamfer-distance/
python tf_nndistance.py

Chamfer-Distance-API

After compiling code for tensorflow, we can use the Chamfer Distance API now. Note the chamfer distance is defined as the sum of square of euclidean distance in the API. Try

python chamfer_test.py

which will calculate chamfer distance between point (1, 1, 1) and (1, 1, -1) and output [8.].

Generally, to use the api, use cd_api = Chamfer_distance() to initialize the class, and then use cd_api.get_chamfer_distance(xyz1,xyz2) to calculate the chamfer distance.

References

chamfer-distance-api's People

Contributors

jinlinyi avatar

Watchers

 avatar

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.