Surface Reconstruction from Point Clouds by Learning Predictive Context Priors (CVPR 2022)
Personal Web Pages | Paper | Project Page
This repository contains the code to reproduce the results from the paper. [Surface Reconstruction from Point Clouds by Learning Predictive Context Priors](https://arxiv.org/abs/2204.11015).You can find detailed usage instructions for training your own models and using pretrained models below.
If you find our code or paper useful, please consider citing
@inproceedings{PredictiveContextPriors,
title = {Surface Reconstruction from Point Clouds by Learning Predictive Context Priors},
author = {Baorui, Ma and Yu-Shen, Liu and Matthias, Zwicker and Zhizhong, Han},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2022}
}
Pytorch Version
This work was originally implemented by tensorflow, pytroch version of the code will be released soon that is easier to use.
Related work
Pytorch
https://github.com/mabaorui/NeuralPull-Pytorch
Tensorflow
https://github.com/mabaorui/NeuralPull
https://github.com/mabaorui/OnSurfacePrior
https://github.com/mabaorui/PredictableContextPrior
Surface Reconstruction Demo
Predicted Queries Visualization
Predicted queries in Loccal Coorinate System
Installation
First you have to make sure that you have all dependencies in place. The simplest way to do so, is to use anaconda.
You can create an anaconda environment called tf
using
conda env create -f tf.yaml
conda activate tf
Training
You should train the Local Context Prior Network first, run
python pcp.py --input_ply_file test.ply --data_dir ./data/ --CUDA 0 --OUTPUT_DIR_LOCAL ./local_net/ --OUTPUT_DIR_GLOBAL ./glocal_net/ --train --save_idx -1
You should put the point cloud file(--input_ply_file, only ply format) into the '--data_dir' folder.
Then train the Predictive Context Prior Network, run
python pcp.py --input_ply_file test.ply --data_dir ./data/ --CUDA 0 --OUTPUT_DIR_LOCAL ./local_net/ --OUTPUT_DIR_GLOBAL ./glocal_net/ --finetune --save_idx -1
Test
You can extract the mesh model from the trained network, run
python pcp.py --input_ply_file test.ply --data_dir ./data/ --CUDA 0 --OUTPUT_DIR_LOCAL ./local_net/ --OUTPUT_DIR_GLOBAL ./glocal_net/ --test --save_idx -1
ToDo
In different datasets or your own data, because of the variation in point cloud density, this '0.5' parameter has a very strong influence on the final result, which controls the distance between the query points and the point cloud. So if you want to get better results, you should adjust this parameter. We give '0.5' here as a reference value, and this value can be used for most object-level reconstructions. For the scene dataset, we will later publish the reference values for the hyperparameter settings for the scene dataset.