From 7fb2b53a021570df3480510e549bd61a3092dfd5 Mon Sep 17 00:00:00 2001 From: Kaichun MO Date: Tue, 10 Sep 2019 01:03:33 -0700 Subject: [PATCH] first commit --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d736740 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# PyTorch Point-cloud Earth-Mover-Distance (EMD) Implementation + +## Dependency + +The code has been tested on Ubuntu 16.04, PyTorch 1.1.0, CUDA 9.0. + +## Usage + +First compile using + + python setup.py install + +Then, copy the lib file out to the main directory, + + cp build/lib.linux-x86_64-3.6/emd_cuda.cpython-36m-x86_64-linux-gnu.so . + +Then, you can use it by simply + + from emd import earth_mover_distance + d = earth_mover_distance(p1, p2, transpose=False) # p1: B x N1 x 3, p2: B x N2 x 3 + +Check `test_emd_loss.py` for example. + +## Author + +The cuda code is originally written by Haoqiang Fan. The PyTorch version is modified by Kaichun Mo. + +## License + +MIT +