Git Product home page Git Product logo

nesti-net's Introduction

Nesti-Net: Normal Estimation for Unstructured 3D Point Clouds using Convolutional Neural Networks

Created by Yizhak (Itzik) Ben-Shabat, Michael Lindenbaum, and Anath Fischer from Technion, I.I.T.

Nesti-Net_pipeline

Introduction

This is the code for estimating normal vectors for unstructured 3D point clouds using Nesti-Net. It allows to train, test and evaluate our different normal estimation models. We provide the option to train a model or use a pretrained model. Please follow the installation instructions below.

Here is a short YouTube video providing a brief overview of the methods.

Abstract:

We propose a normal estimation method for unstructured 3D point clouds. This method, called Nesti-Net, builds on a new local point cloud representation which consists of multi-scale point statistics (MuPS), estimated on a local coarse Gaussian grid. This representation is a suitable input to a CNN architecture. The normals are estimated using a mixture-of-experts (MoE) architecture, which relies on a data-driven approach for selecting the optimal scale around each point and encourages sub-network specialization. Interesting insights into the network's resource distribution are provided. The scale prediction significantly improves robustness to different noise levels, point density variations and different levels of detail. We achieve state-of-the-art results on a benchmark synthetic dataset and present qualitative results on real scanned scenes.

Citation

If you find our work useful in your research, please cite our CVPR paper:

@inproceedings{Ben-Shabat_2019_CVPR,
	author = {Ben-Shabat, Yizhak and Lindenbaum, Michael and Fischer, Anath},
	title = {Nesti-Net: Normal Estimation for Unstructured 3D Point Clouds Using Convolutional Neural Networks},
	booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
	month = {June},
	year = {2019}
}

Preprint:

@article{ben_shabat2018nestinet,
  title={Nesti-Net: Normal Estimation for Unstructured 3D Point Clouds using Convolutional Neural Networks},
  author={Ben-Shabat, Yizhak and Lindenbaum, Michael and Fischer, Anath},
  journal={arXiv preprint arXiv:1812.00709},
  year={2018}
}

Additionally, if you found this relevant to your work, you may also find our latest DeepFit paper and repo relevant.

Installation

Install Tensorflow and scikit-learn. You will also need torch, and torchvision for the PCPNet data loader.

The code was tested with Python 2.7, TensorFlow 1.12, torch 0.4.1, torchvision 0.2.1, CUDA 9.2.148, and cuDNN 7201 on Ubuntu 16.04.

Download the PCPNet data from this link and place it in the data directory. Alternatively, download the data used to train and test Nesti-Net from this link and place it in the data directory.

Download all trained models from this link and place them in the models directory. alternatively, dowload just the mixture of experts model (Nesti-Net) from this link

Train

This repository allows to train a Nesti-Net multi-scale mixture of experts network for normal estimation. Simply run train_n_est_w_experts.py.

This repository allows to train additional three vatiations: Single-scale / multi-scale models can be trained by running train_n_est.py. Multi-scale with switching - i.e. estimating the noise and switching between small scale network and large scale network (note that for this you will need a .txt file specifying the noise for each point cloud). It can be trained by running train_n_est_w_switching.py.

Test

To test Nesti-Net run test_n_est_w_experts.py and input the desired model log directory.

In order to test on your own data, place your point cloud directory in the data directory. Make sure that your point cloud directory includes a test set .txt file, that lists the files you wish to include in the test.

For the other models run the corresponding test_...py file.

Testing the different models will generate a results directory inside the trained model log directory. The results will be saved as separate .normals files containing the estimated normals.

Evaluate

To compute the RMS error, PGP5 or PGP10 evaluation metrics run evaluate.py for the desired results directory. The evaluation results will be saved in a summary directory within the results directory.

License

See LICENSE file.

nesti-net's People

Contributors

sitzikbs 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

Watchers

 avatar  avatar  avatar

nesti-net's Issues

Question about training and testing noise level

Hi @sitzikbs,

Thanks for releasing your code.

I am a little confused about what noise level do you use in training and testing. When you perform a training, did you train with all noise levels at once then test on different noise levels? or did you do (train on noise level A - test on noise level A) pairs?

Best,
Ryan

Missing text files in the data

The text files mentioned in the pcpnet_dataset are not there in the dataset downloaded.
Or if you could let us know what should be written in the text files, it would be really helpful.

Orientation of normals

Hi, big thanks for open sourcing this repository.

I encountered an issue related to the orientation of the predicted normals. As far as I understand, the prediction of the normal can be ambiguous, since it can be pointed either inside or outside the object. E.g., here is the prediction I obtained by Nesti-Net (using test_n_est_w_experts.py and the provided model weights):

while the ground truth normals look like this:

gt

The green regions seem to be caused by the wrong orientation of the normals. If I invert them manually, the prediction becomes closer to the correct values there. I've also observed the same effect for other point clouds.

Is it the expected behavior or I'm inferring the pipeline in the wrong way? If I'm running it correctly, is there any way to find which normals are facing in the wrong direction? I tried some simple heuristics but they only work for simple convex shapes.

Configuration for Python 3

This is actually not an issue but a suggestion on how to change the code slightly to make it suitable for Python 3. Initially, I had trouble installing all the libraries (especially TensorFlow) for Python 2.7, as recommended in the readme, since it's no longer supported.

For installation of Nesti-Net for Python 3 on Ubuntu 18.04.3 LTS with CUDA 10.0, I came up with the following conda environment:

  • python 3.6.12
  • tensorflow-gpu 1.14.0 (installed via pip install tensorflow-gpu==1.14)
  • opencv 3.4.2
  • torch 1.3.0, torchvision 0.4.1
  • cudatoolkit 10.0.130
  • cudnn 7.6.5

I suspect that more actual versions of tensorflow-gpu and torch could be installed (also depending on the CUDA version), though with these ones I can confirm that it works on my machine.

I also had to change 2 files for their Python 3 support: test_n_est_w_experts.py (new version) and experts_n_est.py (new version). Perhaps other files needed for training can be changed in a similar fashion, but changing these should be sufficient for the inference of Nesti-Net. Hopefully, these guidelines can be useful for the community.

Questions about training/testings set

Hi @sitzikbs,

Thanks for this work and releasing code. I have two questions regards your paper.

  1. In section 4.1 Datasets, you mentioned the PCPNet test dataset has 22 shapes. I downloaded the PCPNet dataset from the PCPNet project page and found there are only 19 shapes in the test set, and 3 shapes in the validation set and the validation set is a part of the test set, so if I understand correctly, there are only 19 shapes in the test set?

  2. In section 4.2 Training details, you mentioned you trained with 32768 (1024 samples x 32 shapes) random subsets. Does that mean you count 8 shapes with 4 noise levels as 32 shapes?

Best,
Zirui

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.