Code Monkey home page Code Monkey logo

roreg's Introduction

🤗 RoReg

IEEE TPAMI 2023

Haiping Wang*,1, Yuan Liu*,2, Qingyong Hu3, Bing Wang4, Jianguo Chen5, Zhen Dong†,1, Yulan Guo6, Wenping Wang7 Bisheng Yang†,1

1Wuhan University    2The University of Hong Kong    3University of Oxford   
4The Hong Kong Polytechnic University    5DiDi Chuxing   
6Sun Yat-sen University    7Texas A&M University   
*The first two authors contribute equally.    Corresponding authors.   

We present RoReg, a novel point cloud registration framework that fully exploits oriented descriptors and estimated local rotations in the whole registration pipeline. Previous methods mainly focus on extracting rotation-invariant descriptors for registration but unanimously neglect the orientations of descriptors. In this paper, we show that the oriented descriptors and the estimated local rotations are very useful in the whole registration pipeline, including feature description, feature detection, feature matching, and transformation estimation. Consequently, we design a novel oriented descriptor RoReg-Desc and apply RoReg-Desc to estimate the local rotations. Such estimated local rotations enable us to develop a rotation-guided detector, a rotation coherence matcher, and a one-shot-estimation RANSAC, all of which greatly improve the registration performance. Extensive experiments demonstrate that RoReg achieves state-of-the-art performance on the widely-used 3DMatch and 3DLoMatch datasets, and also generalizes well to the outdoor ETH dataset. In particular, we also provide in-depth analysis on each component of RoReg, validating the improvements brought by oriented descriptors and the estimated local rotations.

🆕 News

  • 2023-02-28: A multiview registration mehtod SGHR is accepted by CVPR 2023! 🎉🎉

  • 2023-02-05 RoReg has been accepted by IEEE TPAMI! 🎉🎉

    [TPAMI]

    [Project_Page]

    [Supplementary_Material]

  • 2022-09-16 The code of RoReg is released.

  • 2022-06-30 The early work of RoReg, a.k.a YOHO, is accepted by ACM MM 2022! 🎉🎉

💻 Requirements

Here we offer the FCGF backbone RoReg. Thus FCGF requirements need to be met:

  • Ubuntu 14.04 or higher
  • CUDA 11.1 or higher
  • Python v3.7 or higher
  • Pytorch v1.6 or higher

Specifically, The code has been tested with:

  • Ubuntu 16.04, CUDA 11.1, python 3.7.10, Pytorch 1.7.1, GeForce RTX 2080Ti.

🔧 Installation

  • First, create the conda environment:
      conda create -n roreg python=3.7
      conda activate roreg
    
  • Second, intall Pytorch. We have checked version 1.7.1 and other versions can be referred to Official Set.
      conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
    
  • Third, install MinkowskiEngine v0.5 for FCGF feature extraction:
      cd utils/MinkowskiEngine
      conda install openblas-devel -c anaconda
      export CUDA_HOME=/usr/local/cuda-11.1 #We have checked cuda-11.1.
      python setup.py install --blas_include_dirs=${CONDA_PREFIX}/include --blas=openblas
      cd ../..
    
  • Fourth, install other packages, here we use 0.8.0.0 version Open3d for Ubuntu 16.04:
    pip install -r requirements.txt
    

💾 Dataset & Pretrained model

The datasets and pretrained weights have been uploaded to Google Cloud:

Also, all data above can be downloaded in BaiduDisk(Code:b4zd), where the checkpoints of RoReg and 3dm_train_rot are saved in YOHO/RoReg.

Datasets above contain the point clouds (.ply) and keypoints (.txt, 5000 per point cloud) files. Please place the data to ./data/origin_data following the example data structure as:

data/
├── origin_data/
    ├── 3dmatch/
    	└── kitchen/
            ├── PointCloud/
            	├── cloud_bin_0.ply
            	├── gt.log
            	└── gt.info
            └── Keypoints/
            	└── cloud_bin_0Keypoints.txt
    ├── 3dmatch_train/
    └── ETH/

🚅 Train

To train RoReg-Desc and local rotation estimation (one-shot transformation estimation) with the FCGF backbone we offer, you can first prepare the trainset:

python trainset.py --component GF

and conduct training of the two components by:

python Train.py --component GF # for RoReg-Desc, requiring ~250G storage space.
python Train.py --component ET # for local rotations

After the training of RoReg-Desc and local rotation estimation, you can follow the commonds to train rotation-guided detector yourself:

python trainset.py --component RD
python Train.py --component RD

To train rotation coherence matcher yourself, you can follow the commonds of

python trainset.py --component RM # require ~300G storage space.
python Train.py --component RM

All models will be saved in ./checkpoints/FCGF.

🔦 Demo

With the pretrained models, you can try RoReg with:

python demo.py

✏️ Test on the 3DMatch and 3DLoMatch

With the TestData downloaded above, the test on 3DMatch and 3DLoMatch can be done by

  • Prepare the testset
python testset.py --dataset 3dmatch --voxel_size 0.025
  • Eval the results:
python Test.py --RD --RM --ET yohoo --keynum 1000 --testset 3dmatch

--RD denotes using the proposed rotation-guided detector, and we will use randomly-sampling without it.

--RM denotes using the proposed rotation coherence matcher, and we will use NN+mutual without it.

--ET denotes the choice of transformation estimation. yohoo means using the proposed one-shot transformation estimation, and we also offer another faster RANSAC variant yohoc.

--keynum denotes to sample how many keypoints in each scan for matching.

--dataset denotes the evaluation dataset: 3dmatch for the 3DMatch dataset and 3dLomatch for the 3DLoMatch dataset.

More options as well as their descriptions can be found in Test.py.

All the results will be placed to ./data/YOHO_FCGF.

✒️ Generalize to the ETH dataset

The generalization results on the outdoor ETH dataset can be got as follows:

  • Prepare the testset
python testset.py --dataset ETH --voxel_size 0.15
  • Eval the results:
python Test.py --RD --RM --ET yohoo --keynum 1000 --testset ETH --tau_2 0.2 --tau_3 0.5 --ransac_ird 0.5

All the results will be placed to ./data/YOHO_FCGF.

💡 Citation

If you find RoReg/YOHO useful in your research, please consider citing:

@inproceedings{wang2022you,
  title={You only hypothesize once: Point cloud registration with rotation-equivariant descriptors},
  author={Wang, Haiping and Liu, Yuan and Dong, Zhen and Wang, Wenping},
  booktitle={Proceedings of the 30th ACM International Conference on Multimedia},
  pages={1630--1641},
  year={2022}

@ARTICLE{wang2023roreg,
  author={Wang, Haiping and Liu, Yuan and Hu, Qingyong and Wang, Bing and Chen, Jianguo and Dong, Zhen and Guo, Yulan and Wang, Wenping and Yang, Bisheng},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={RoReg: Pairwise Point Cloud Registration with Oriented Descriptors and Local Rotations}, 
  year={2023},
  volume={},
  number={},
  pages={1-18},
  doi={10.1109/TPAMI.2023.3244951}}
}

🔗 Related Projects

Welcome to take a look at the homepage of our research group WHU-USI3DV ! We focus on 3D Computer Vision, particularly including 3D reconstruction, scene understanding, point cloud processing as well as their applications in intelligent transportation system, digital twin cities, urban sustainable development, and robotics.

YOHO is the early work of RoReg and we sincerely thank the contributing projects:

  • EMVN for the group details;
  • FCGF for the backbone;
  • 3DMatch for the 3DMatch dataset;
  • Predator for the 3DLoMatch dataset;
  • ETH for the ETH dataset;
  • PerfectMatch for organizing the 3DMatch and ETH dataset.

roreg's People

Contributors

hpwang-whu 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  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

roreg's Issues

Error occurs at the fourth step,"python setup.py install --blas=... --blas=..."

Hello,Mr HpWang.When trying to complie the code,I trapped by a problem at the fourth step.The final line of the error information show:
File "/home/shenzhen/anaconda3/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1909, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
My deep learning environment:ubuntu20.04 cuda11.1 cudnn8.0 pytorch1.7.1 torchvision0.8.2 torchaudio0.7.2 python3.7 gcc7 g++7 Anaconda3
I ask for your helping hand,please.Thank you very much!

CUDA11.4

What should I do if the environment setup fails when I use cuda11.4 version but there is no pytorch compatible with 11.4?

关于旋转等变特征到旋转不变特征计算的一个问题

感谢诸位的杰出工作!当我在学习贵组发表的论文RoReg: Pairwise Point Cloud Registration With Oriented Descriptors and Local Rotations时,对于旋转等变特征到旋转不变特征计算的计算有一个困惑的点:旋转等变特征的60xn特征图,每一个旋转是对60行中某些行的置换操作,那么计算旋转不变特征时似乎应该进行的是对每一列取均值池化形成1xn的特征?但论文中的表述是“computed by average pooling on the F along the row direction”,这让我感到不解,这样操作似乎并没有消除置换的影响?我在查看您在该项目提供的代码后,也发现似乎是将bnxfxgn的特征图转为了bnxf,如果f表示特征维度,似乎是我的理解是正确的。如果方便的话,希望您能帮我解答一下这个疑惑!或者我有没有完全理解到位的地方,也希望您能不吝赐教!
祝好!

Error while training python Train.py --component GF

Hello, I am experiencing an error when I try to train the GF component. I generate the data using python trainset.py --component GF and then start training python Train.py --component GF. I am using the 3dm_train_rot dataset provided by you.
The following is the error message
`
File "Train.py", line 19, in
generator.run()
File "/scratch.ssd/dejvax/job_19076217.meta-pbs.metacentrum.cz/RoReg-master/train/trainer.py", line 134, in run
val_results=self.val_evaluator(self.network, self.val_set)
File "/scratch.ssd/dejvax/job_19076217.meta-pbs.metacentrum.cz/RoReg-master/train/val.py", line 45, in call
outputs=model(data)
File "/storage/plzen1/home/dejvax/.conda/envs/roreg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/scratch.ssd/dejvax/job_19076217.meta-pbs.metacentrum.cz/RoReg-master/network/group_feat.py", line 64, in forward
yoho_0=self.PartI_net(feats0)
File "/storage/plzen1/home/dejvax/.conda/envs/roreg/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/scratch.ssd/dejvax/job_19076217.meta-pbs.metacentrum.cz/RoReg-master/network/group_feat.py", line 37, in forward
feats_eqv=self.SO3_Conv(feats)# bn,f,gn
File "/scratch.ssd/dejvax/job_19076217.meta-pbs.metacentrum.cz/RoReg-master/network/group_feat.py", line 27, in SO3_Conv
data=self.data_process(data)
File "/scratch.ssd/dejvax/job_19076217.meta-pbs.metacentrum.cz/RoReg-master/network/group_feat.py", line 22, in data_process
data=data[:,:,self.Nei_in_SO3]
IndexError: too many indices for tensor of dimension 2
| 5998/669600 [27:29<50:42:06, 3.64it/s, loss=0.597, lr=0.0001]

`
I thought it might be related to this question: [https://github.com//issues/1#issuecomment-1476075494] but I tried batch_size 1 and 32 and it still persists
Looking forward to your answer

Point clouds frame

Hi,
I have a doubt about using RoReg on custom data.
Must the point cloud be expressed in the sensor's reference frame (i.e. with the center in 0,0,0) due to the rotations that have to be applied for extracting the features? I'm having some problem with using the pretrained network and trying to align point clouds that are expressed w.r.t. a "map" frame, and I was wondering if that's the issue.

Thanks

Preprocessed dataset

Hi, thanks for the amazing work! I have questions about your preprocessed 3DMatch datasets. Are the keypoints generated from the work FCGF? And I notice you mentioned keypoint detection in the Method section of the paper, so I also wonder how these keypoints (from the preprocessed datasets) are used in your algorithm.
Best regards

This problem occurred when I was training. Why

(torch)user@ul1:/anaconda3/envs/torch/RoReg$ python trainset.py --component GFTraceback (most recent call last):
File "trainset.py" , line 1, in
import parses. parses gf as parses gf
NoduleNotFoundError: No module named 'Parses.parses_gf"'

How should I train my dataset?

Hello, I would like to use your model to train on my own dataset. My dataset consists of point clouds from different viewpoints of a statue. However, I do not have the corresponding rotation and translation matrices between the point clouds pairwise. How can I address this issue? Thank you!

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.