Giter VIP home page Giter VIP logo

dip's Introduction

Distinctive 3D local deep descriptors, ICPR 2020

Distinctive 3D local deep descriptors (DIPs) are rotation-invariant compact 3D descriptors computed using a PointNet-based deep neural network. DIPs can be used to register point clouds without requiring an initial alignment. DIPs are generated from point-cloud patches that are canonicalised with respect to their estimated local reference frame (LRF). DIPs can effectively generalise across different sensor modalities because they are learnt end-to-end from locally and randomly sampled points. DIPs (i) achieve comparable results to the state-of-the-art on RGB-D indoor scenes (3DMatch dataset), (ii) outperform state-of-the-art by a large margin in terms of generalisation on laser-scanner outdoor scenes (ETH dataset), and (iii) generalise to indoor scenes reconstructed with the Visual-SLAM system of Android ARCore.

Paper (pdf)

Descriptor quality and generalisation ability

Descriptor quality is assessed using feature-matching recall [6]. See the paper for the references.

3DMatch dataset Generalisation ability on ETH dataset

Tested with

Installation

git clone https://github.com/fabiopoiesi/dip.git
cd dip
pip install -r requirements.txt
pip install torch-cluster==1.4.5 -f https://pytorch-geometric.com/whl/torch-1.4.0.html
cd torch-nndistance
python build.py install

Download datasets and preprocessed data

The datasets used in the paper are listed below along with links pointing to their respective original project page. For convenience and reproducibility, our preprocessed data1 are available for download. The preprocessed data for the 3DMatchRotated dataset (augmented version of 3DMatch) is not provided, it needs preprocessing (see below). After downloading folders and unzipping files, the dataset root directory should have the following structure.

.
├── 3DMatch_test
├── 3DMatch_test_pre
├── 3DMatch_train
├── 3DMatch_train_pre
├── ETH_test
├── ETH_test_pre
└── VigoHome

3DMatch dataset

The original dataset can be found here. We used data from the RGB-D Reconstruction Datasets. Point cloud PLYs are generated using Multi-Frame Depth TSDF Fusion from here.

ETH dataset

The original dataset can be found here.

VigoHome dataset

We collected VigoHome with our Android ARCore-based Visual-SLAM App. The dataset can be downloaded here, while the App's apk can be downloaded here (available soon).

Preprocessing

Preprocessing can be used to generate patches and LRFs for training. This will greatly reduce training time. Preprocessing requires two steps: the first step computes point correspondences between point-cloud pairs using the Iterative Closest Point algoritm; the second step produces patches along with their LRF. To preprocess 3DMatch training data, run preprocess_3dmatch_correspondences_train.py and preprocess_3dmatch_lrf_train.py (same procedure for test data). Just make sure that datasets are downloaded and the paths in the code set.

Training

Training requires preprocessed data, i.e. patches and LRFs (it would be too slow to extract and compute them at each iteration during training). See preprocessing to create your own preprocessed data or download our preprocessed data. To train set the variable dataset_root in train.py. Then run

python train.py

Training generates checkpoints in the chkpts directory and the training logs in the logs directory. Logs can be monitored through tensorboard by running

tensorboard --logdir=logs

Demo using pretrained model

We included three demos, one for each dataset we evaluated in the paper. The point clouds processed in the demos are in assets directory and the model trained on the 3DMatch dataset is in model. Run

python demo_3dmatch.py
python demo_eth.py
python demo_vigohome.py

The results of each demo should look like the ones here below. Because the registration is estimated with RANSAC, results may differ slightly at each run.

3DMatch dataset ETH dataset VigoHome dataset

Graphs

Graphs2,3 of Fig. 6 can be generated by running

python graphs/viz_graphs.py

Citing our work

Please cite the following paper if you use our code

@inproceedings{Poiesi2021,
  title = {Distinctive {3D} local deep descriptors},
  author = {Poiesi, Fabio and Boscaini, Davide},
  booktitle = {IEEE Proc. of Int'l Conference on Pattern Recognition},
  address = {Milan, IT}
  month = {Jan}
  year = {2021}
}

Acknowledgements

This research has received funding from the Fondazione CARITRO - Ricerca e Sviluppo programme 2018-2020.

We also thank 1Zan Gojcic, 2Chris Choy and 3Xuyang Bai for providing us with their support in the collection of the data for the paper.

dip's People

Contributors

fabiopoiesi avatar houyongkuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dip's Issues

RuntimeWarning: divide by zero encountered in double_scalars

Dear professor,

  When I run the `Demo_eth.py` ,I get a bug.

E:\project_1\dip-master\lrf.py:47: RuntimeWarning: divide by zero encountered in double_scalars a1 = 1 / np.linalg.norm(np.dot(v, (alpha * beta)[:, np.newaxis])) E:\project_1\dip-master\lrf.py:49: RuntimeWarning: divide by zero encountered in double_scalars xp = 1 / np.linalg.norm(np.dot(v, (alpha * beta)[:, np.newaxis])) * np.dot(v, (alpha * beta)[:, np.newaxis]) E:\project_1\dip-master\lrf.py:49: RuntimeWarning: invalid value encountered in multiply xp = 1 / np.linalg.norm(np.dot(v, (alpha * beta)[:, np.newaxis])) * np.dot(v, (alpha * beta)[:, np.newaxis])

Can you give mo some advice? Thanks.
Best.

Question about the Paper

Hi @fabiopoiesi ,
I really enjoyed reading your paper and thanks for supplying your code.
After reading the paper I have some question which are still unclear to me.

  1. In the bottleneck part you explain how you find potential matched points within the corresponding patches using alpha and alpha' that their corresponding feature cross some threshold.
    It is not clear to me when you use this idea in the training pipeline, or you just mentioned that for general analysis?

  2. In Equ (6), it is not clear to me how you define the sets C_pos and C_neg and how you generate the feature vectors f.
    Does C_pos are a set of matching patches with their network output?

Thanks
Yuval

preprocessed data

Hi, I really appreciate your work on point cloud registration .The link of preprocessed data has been unable to be opened. Is there any other way or can you send it to me.Thank you very much.

Covariance matrix computation

dip/lrf.py

Line 27 in 6b72d5c

ptnn_cov = 1 / len(ptnn) * np.dot((ptnn - pt[:, np.newaxis]), (ptnn - pt[:, np.newaxis]).T)

image
The ptnn is arranged like [3, N], so it should be 1 / ptnn.shape[1] instead of 1 / len(ptnn) ?

final_chkpt.pth

Hi,I used the trained model ckpt_e39_i14400_dim32.pth and the final_chkpt.pth you gave for testing.The test results are different.May I ask how the final_chkpt.pth is obtained.

Questions about data generation

Thanks for your sharing, here I have a question about how to generate 3DMatch_train.zip data.

As far as I know, the data downloaded from 3DMatch contains 62 RGB-D sequences, do those *.ply files were generated by TSDF fusion provided by 3DMatch-toolbox?

Thanks for your help.

How to find the overlap region?

Dear author,
thanks for your excellent work.
I'm a beginner in the filed of Point Cloud Registration. I still don't know how to find the overlap region. The red points seems to be randomly selected in the source code. Could you please give some advice?
image

AttributeError: module 'open3d' has no attribute 'registration'

Hi, thanks for your interesting work.
When I preprocessed 3DMatch training data, I got the error "AttributeError: module 'open3d' has no attribute 'registration' ".

from isl-org/Open3D#2951
**o3d.pipelines.**registration.compute_fpfh_feature(pcd).

It seems that now it is under pipelines based on the new documentation http://www.open3d.org/docs/release/python_api/open3d.pipelines.html

So in preprocess_3dmatch_correspondences_train.py, we can use:

 result =o3d.pipelines.registration.registration_icp(pcd1, pcd2, .02, np.eye(4),
                                                           o3d.pipelines.registration.TransformationEstimationPointToPoint())

Thanks!
Best wishes!

Code problem

Is there a problem here? Using the min function to find the minimum value of the array, the contents of the array are the same.
微信截图_20230905205233

License issue

Hi, very appreciate the work you have done!

I am just curious about the license of this work. MIT? BSD?

Any plan to announce how you are going to distribute this work?

Thank you so much

kitti

Hello professor, can you provide the weights trained on KITTI? thank you very much!

Loss does not decrease?

In my experiments, the loss remains to be around 0.8-1.1 even after 300k iterations. Is it right?

Problem of no points inside the kernel size

Hi, I am really appreciated with your works!

I am just wondering how you dealt with the situation where no points or fewer than 3 points are inside the LRF kernel in lpf.py:

dip/lrf.py

Line 21 in 6b72d5c

_, patch_idx, _ = self.pcd_tree.search_radius_vector_3d(pt, self.patch_kernel)

This results in complex numbers in xp, yp, zp.

dip/lrf.py

Line 45 in 6b72d5c

xp = 1 / np.linalg.norm(np.dot(v, (alpha * beta)[:, np.newaxis])) * np.dot(v, (alpha * beta)[:, np.newaxis])

image

How did you resolve this problem?

As a solution, putting in zero xyz values to the patch would be a problem. Any ideas?

Thank you very much!

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.