Giter Club home page Giter Club logo

fast_rnrr's Introduction

Fast_RNRR

This repository includes the source code of the paper "Quasi-Newton Solver for Robust Non-Rigid Registration", (CVPR2020), https://arxiv.org/abs/2004.04322.

Authors: Yuxin Yao, Bailin Deng, Weiwei Xu and Juyong Zhang.

This code is protected under patent. It can be only used for research purposes. If you are interested in business purposes/for-profit use, please contact Juyong Zhang (the corresponding author, email: [email protected]).

Dependencies

  1. OpenMesh
  2. Eigen

Compilation

The code is compiled using CMake and tested on Ubuntu 16.04 (gcc5.4.0) and on Windows with Visual Studio 2015. Follow the following steps to compile the code:

  1. Make sure Eigen and OpenMesh is installed.

  2. Create a build folder 'build' within the root directory of the code

  3. Run cmake to generate the build files inside the build folder, and compile the source code:

    • On linux, run the following commands within the build folder:
    $ cmake -DCMAKE_BUILD_TYPE=Release ..
    $ make
    
    • On windows, use the cmake GUI to generate a visual studio solution file, and build the solution.
  4. Afterwards, there should be an executable Fast_RNRR generated.

Usage

The program is run with four input parameters:

$ Fast_RNRR <srcFile> <tarFile> <outPath> <landmarkFile>

1.<srcFile>: an input file storing the source mesh;

2.<tarFile>: an input file storing the target mesh or point cloud;

3.<outPath>: an output file storing the path of registered source mesh;

4.<landmarkFile>: an landmark file (nx2 matrix, first column includes the indexes in source file, second column includes the indexes in target file, each row is a pair correspondences separated by space).

<landmarkFile> can be ignored, our robust non-rigid registration method without landmarks will be used in this case.

Notes

This code supports non-rigid registration from a triangle mesh to a mesh or a point cloud.

Recently Updates (2020.9)

  1. Simplify the code, just keep our method, delete the initialization operator of SHOT feature and diffusion pruning, you can also use PCL to precompute initial correspondences if necessary. The old version move to the src_cvpr folder.
  2. Change the calculation method of geodesic distance to locally using of VTP method, in order to be more robust to unclosed mesh when constructing the sampling node graph.
  3. Optional marking of points without correspondences, and exclusion of certain incorrect point pairs by distance and normal thresholds.

Parameter choices

  1. The weight parameters of regularization term and rotation term can be set in paras.alpha and paras.beta in main.cpp respectively. You can increase them to make the model more maintain the original characteristics, and decrease them to make deformed model closer to the target model.
  2. If you need to reject correspondences with a large difference between distance or normal when looking for the closest point, you can set the paras.distance_threshold and paras.normal_threshold in main.cpp.
  3. The radius parameter R of the deformation graph is set R=5l(paras.uni_sample_radio = 5 in main.cpp) by default. If you want to reduce the number of graph nodes, increase this value, otherwise, reduce it. When the vertices in the source model are not very uniform and the sampling radius is small, some graph nodes are not covered by any mesh vertices, and it will cause the error "Some points cannot be covered under the specified radius, please increase the radius". It can be solved by increasing the sampling radius(paras.uni_sample_radio). It is worth noting that the input source model must have no isolated points.

Citation

Please cite the following papers if it helps your research:

@InProceedings{Yao_2020_CVPR,
    author = {Yao, Yuxin and Deng, Bailin and Xu, Weiwei and Zhang, Juyong},
    title = {Quasi-Newton Solver for Robust Non-Rigid Registration},
    booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2020}
}

Acknowledgement

This work was supported by the National Natural Science Foundation of China (No. 61672481), and Youth Innovation Promotion Association CAS (No. 2018495).

fast_rnrr's People

Contributors

juyong avatar yaoyx689 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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

fast_rnrr's Issues

weird result in the example data

Hi, @Juyong and @yaoyx689 , thanks for kindly sharing the source code. There are so many brilliant ideas and the results are stunning!

However, when i run the code, there some weried results.
I run this code at the example data "partial overlap" , mesh_0018.obj to mesh_0020.obj, which shown as follows:

  1. mesh_0018.obj:
    image

  2. mesh_0020.obj
    image

  3. the result
    image

  4. the provided result
    image

I run the code utilize the code under src_cvpr dir, which utilizes the nearest point as the initial correspondence as defaults.
could you tell me why I generate a weird result?
Thanks in advance, your reply will vary appreciated.

The format of point cloud to input

It says the code supports non-rigid registration from a triangle mesh to a mesh or a point cloud. Then if I want to input a point cloud, what format is supported in this code? And is there any part of the code has to be modified please? Thank you so much

Different results from src and src_cvpr????

Thanks for sharing the codes. @Juyong @yaoyx689
I want to register the head of SMPL human model into my 3d scan data for hole filling. The back of a head is hard to scan, and my model has a big hole there. I think non-rigid registration could help. (Do you have any suggestions for it?)

Currently, I am making some tests on synthetic data using Fast_RNRR and NonRigidreg with different methods.
With the same set of source and target data, Fast_RNRR and NonRigidreg with method 3 don't give the same result. Is it caused by a mistake in building or parameters in the scripts????
Fast_RNRR gives a very long straight line. What is this issue?

About test model

hello!it's me again. I checked the test data and noticed that the source and target mesh has the same vertex\face\edge\half edge. so my question is did you guys use some methods to initialize the model? if so ,which method did you use or how you accomplish it?

Because for my design model which has
Vertex:8 face:12 edge: 18 half_edge: 36
and I change it a little bit, the changed model has
Vertex:3645 face:7286 edge: 10929 half_edge: 21858

It dosen't working for my designed model.

Usage of fixed_vertices

Hi, I'm trying to understand your method and run your code about non-rigid registration, I found a parameter named fixedvex in RegParas but never used. would you mind me asking the usage of the parameter? To fix the mesh boundary or skip finding the correspondence step?

About dynamic scenes.

Congratulations on your results, we are very interested in incorporating your results into our work.

What we want to know is, does the mesh-pointcloud registration support complex dynamic scenes?

If the source and target used for registration only partially overlap, can accurate registration be accomplished?

Unexpected end of file while reading.

hello,thank you for your work!
I made a model myself for testing, but it seems a little problem. I use your test data and runs a perfect result. But use my own design model it suggests:
Custom face Properties defined, before 'vertex_indices' property was defined. They will be skipped.
Custom face Properties defined, before 'vertex_indices' property was defined. They will be skipped.
Unexpected end of file while reading.
Can you tell me how to solve it? Thank you!

numerical issues

I tried your old version code and got error: numerical issues,then the output.obj is the same as src.obj What's wrong?

Can this tool be used for face registration?

Hi, thanks for your outstanding work. I have a series of 3D face scans and I want to do face registration by fitting a mesh template(like BFM model) on the scans. Can this tool be used for this process? Thanks.

The runtime of the function Prune::Initialize()

when I try to use the old version with the SHOT feature and diffusion pruning, the function Prune::Initialize(hgeodesic* geo, VPairs& corres, double c_0) takes about 30s to Initialize. Is this normal?

关于更新代码的deformation graph node生成相关的问题

hi,大佬,新的代码非常给力,学习到了很多东西,这里关于node生成我有一些问题请教

  1. 更新的测地线计算方法对于非闭合mesh生成的node,形变时仍有非常差的结果,尤其是对于人脸数据
  2. 如果我使用别的方法生成node会对算法最终结果造成多大影响?比如使用fast_marching

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.