Code of Neural-IMLS: Self-supervised Implicit Moving Least-Squares Network for Surface Reconstruction. IEEE Transactions on Visualization and Computer Graphics (TVCG).
This is the code for directly training neural implicit representations from unoriented noisy 3D point clouds.
It allows training, testing, and evaluate the tasks of surface reconstruction.
We provide the code for training and testing a new model on your own data. Besides, we provide some reconstruction results of our method.
Our codebase uses PyTorch.
The code was tested with Python 3.7.9, torch 1.11.0, CUDA 11.3 on Ubuntu 18.04 (should work with later versions).
The most important part of the environment is pytorch3d.
conda env create -f imls.yml
To train the model to overfit one shape, run this command:
python train.py --pts_dir <path_to_data> --name <experiment_name>
For example:
python train.py --pts_dir data/ori_bunny.xyz.npy --name famous_ori_bunny --patch_radius 0.03 --points_per_patch_max 100
Here are some important parameters:
- --patch_radius, ball radius nearest neighbor (FRNN) for MLS, large patch radius brings the smoother results
- --points_per_patch_max, max number of points in a ball, collocation with patch radius
- --k, kth nearest neighbor for MLS, less than 0 means leverage FRNN otherwise KNN
- --loss, MLS Projection, or implicit MLS. Projection MLS is recommended for some thin structures and single-layer geometry, while implicit MLS is recommended for most cases.
- Note that we found it should leverage KNN rather than FRNN for projection MLS.
To evaluate the model, run:
python test.py --model_path <path_to_trained_model> --name <experiment_name> --mesh_path <path_to_gt_mesh>
For example (may need to tune the parameter weight_norm=False in network/IDRNet.py with pre-trained models):
python test.py --model_path experiment/famous_noisefree_Armadillo/epoch_35.pth --name famous_noisefree_Armadillo --mesh_path mesh/Armadillo.obj
We greatly appreciate @ErlerPhilipp for his selfless dedication to the code.
If you use our work, please cite our paper:
@ARTICLE{neuralimls2023wang,
author={Wang, Zixiong and Wang, Pengfei and Wang, Pengshuai and Dong, Qiujie and Gao, Junjie and Chen, Shuangmin and Xin, Shiqing and Tu, Changhe and Wang, Wenping},
journal={IEEE Transactions on Visualization and Computer Graphics},
title={Neural-IMLS: Self-supervised Implicit Moving Least-Squares Network for Surface Reconstruction},
year={2023},
volume={},
number={},
pages={1-16},
doi={10.1109/TVCG.2023.3284233}
}